CLI reference¶
-h and --help display command help; -V and --version display the version.
Command groups¶
| Group | Commands |
|---|---|
| Agent | print, chat |
| Sessions and data | sessions, storage, permissions, memory |
| Extensions | mcp, plugins, hooks |
| Server and swarm | serve, swarm |
| Interactive terminal | gdc-tui |
Global options (gdc)¶
Flags can appear before or after a subcommand. Flags override environment variables, which override configuration.
| Flag | Environment | Purpose |
|---|---|---|
--base-url URL |
GDC_BASE_URL |
OpenAI-compatible model endpoint |
--model NAME |
GDC_MODEL |
Model name |
--reasoning LEVEL |
GDC_REASONING |
off, low, medium, high, extra; default medium |
--api-key KEY |
GDC_API_KEY |
Endpoint credential; env value hidden in help |
--config PATH |
GDC_CONFIG |
Explicit TOML file |
--db-path PATH |
GDC_DB_PATH |
Session database |
--session-id ID |
GDC_SESSION_ID |
Session id; print --resume reloads its history |
Conventions¶
| Property | Behavior |
|---|---|
| Confirmation | Destructive session, retention and grant commands prompt; --yes skips |
| JSON | Supported by inspection subcommands with --json; sessions list uses text |
| Project scope | Data queries generally use current project; scope flags vary by command |
| Database scope | --all stays within one database; sessions list --all-projects scans TUI databases |
| Model requirement | Local data and configuration commands need no model |
See Environment variables and Headless CLI.