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
| Command | Does |
|---|---|
| gray | open the interactive REPL |
| gray resume [--last|--all] [ID] | resume a conversation |
| gray memory list|show|set|edit|remove|clear|audit | curated 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|capabilities | manage plugins (alias plugins) |
| gray install plugin NAME | install from the first-party catalog, or register an executable |
| gray cron list|add|show|run|pause|resume|remove|tick|serve | scheduled jobs |
| gray gateway run|status|start|stop|restart|install|uninstall|setup|on|off | the background daemon |
| gray sessions prune [--older-than-days N] | delete old sessions (default 90 days) |
| gray login [CODE] · whoami · logout | optional gray.alignment.id account |
| gray update | self-update (alias upgrade) |
| gray NAME … | forwarded to a plugin that declares NAME |
Global flags
| Flag | Meaning |
|---|---|
| -p, --print PROMPT | one-shot print mode |
| -c, --continue | continue the most recent conversation |
| --session ID | resume a specific session |
| --model ID | model to use, e.g. provider/model-id |
| --base-url URL | custom API base URL |
| --api-key KEY | API key; beats GRAY_API_KEY and OPENAI_API_KEY |
| --json | NDJSON progress and a final result (with -p or --input-json) |
| --input-json PATH | structured input envelope (requires --json) |
| --max-requests N | provider request cap in JSON print mode |
| --input-price · --output-price | USD per million tokens for budget accounting |
| --context-window TOKENS | override the context window |
| --context-reserve TOKENS | headroom before auto-compact |
| --context-keep TOKENS | tail kept beside the summary |
| --max-turns · --max-cost-usd · --max-wall-secs | run caps |
| --dump-manifest | print the merged plugin manifest and exit |
| -V, --version · -h, --help | you know these |
Join the Discord
Chat with the people building and running Gray. Show what you made with it.
Join Discord →