On this page
CLI Reference
Complete gr command-line reference.
The gr command-line reference, grouped by area:
- Session management — create, attach, stop, fork, migrate, and delete sessions.
- Monitoring & interaction — session lists, conversation search, event streams, token usage, logs, doctor, and driving a running session.
- Messaging & store — inter-agent messaging and the document store.
- Scenarios, triggers & todos — multi-session scenarios, daemon-fired triggers, and the shared todo list.
- Remote access — pair, administer, list, and attach to remote daemons.
- Daemon & other commands — daemon lifecycle, agent introspection, config, completion, command discovery, and internal commands.
Global flags
All commands accept:
| Flag | Description |
|---|---|
--config <path> | Use a specific config file |
--json | Output in JSON format |
--agent-mode | Force agent mode (auto-enables JSON output) |
Agent mode is auto-detected inside a graith session or other AI agent environment (Claude Code, Cursor, Copilot, Amazon Q, OpenCode). GR_AGENT_MODE=0 disables it; GR_AGENT_MODE=1 forces it.