Docs/Reference

CLI reference

Every gray subcommand and global flag: resume, memory, find, grep, view, plugin, cron, gateway, sessions, update and more.

Source: crates/gray/src/lib.rs

Subcommands

CommandDoes
grayopen the interactive REPL
gray resume [--last|--all] [ID]resume a conversation
gray memory list|show|set|edit|remove|clear|auditcurated cross-session memory
gray find PATTERN [PATH]find files by glob, off the index
gray grep PATTERN [PATH]grep file contents, off the index
gray view PATH…show an image or video as an image
gray plugin list|install|remove|update|enable|disable|check|capabilitiesmanage plugins (alias plugins)
gray install plugin NAMEinstall from the first-party catalog, or register an executable
gray cron list|add|show|run|pause|resume|remove|tick|servescheduled jobs
gray gateway run|status|start|stop|restart|install|uninstall|setup|on|offthe background daemon
gray sessions prune [--older-than-days N]delete old sessions (default 90 days)
gray login [CODE] · whoami · logoutoptional gray.alignment.id account
gray updateself-update (alias upgrade)
gray NAME …forwarded to a plugin that declares NAME

Global flags

FlagMeaning
-p, --print PROMPTone-shot print mode
-c, --continuecontinue the most recent conversation
--session IDresume a specific session
--model IDmodel to use, e.g. provider/model-id
--base-url URLcustom API base URL
--api-key KEYAPI key; beats GRAY_API_KEY and OPENAI_API_KEY
--jsonNDJSON progress and a final result (with -p or --input-json)
--input-json PATHstructured input envelope (requires --json)
--max-requests Nprovider request cap in JSON print mode
--input-price · --output-priceUSD per million tokens for budget accounting
--context-window TOKENSoverride the context window
--context-reserve TOKENSheadroom before auto-compact
--context-keep TOKENStail kept beside the summary
--max-turns · --max-cost-usd · --max-wall-secsrun caps
--dump-manifestprint the merged plugin manifest and exit
-V, --version · -h, --helpyou know these

Join the Discord

Chat with the people building and running Gray. Show what you made with it.

Join Discord →

Need help?

Open an issue on GitHub, run /feedback from the REPL, or ask in Discord.

Open an issue →