Skip to content

gdc

The headless command-line program. Runs the agent and provides commands to inspect and manage your data. See Overview for the global options (--base-url, --model, --api-key, --config, --db-path, --session-id) that apply to every subcommand.


gdc print

Run the agent loop with tools, streaming. The reply goes to standard output; progress and tool activity go to standard error.

gdc print "<task>"
Flag Default Description
--max-tokens <n> Maximum tokens in the model's reply.
--temperature <f> Sampling temperature.
--timeout-secs <n> 300 Per-request timeout.
--max-iterations <n> 16 Cap on tool-using rounds in one run.
--max-tool-call-repeats <n> 3 Stop if the model repeats the same tool call this many times (0 disables).
--show-reasoning off Also stream the model's thinking to standard error.
--system "<text>" Replace the default system instructions.
--profile <name> default Starting profile.
--output-style <name> Reply style.
--resume off Reload the conversation for --session-id before sending.
--auto-approve off Approve actions that would otherwise be denied for lack of a human. Trusted environments only.
--auto-approve-remember off Also save those approvals for the project. Requires --auto-approve.
--no-grant-mirror off Don't mirror remembered approvals into the project's config file.
--repair-empty-turn off Recover if a local model returns an empty reply after using a tool.

Headless CLI guide


gdc chat

A single reply, non-streaming, with no tools and no saved history. Use it to check that your model is reachable.

gdc chat "<prompt>"
Flag Default Description
--max-tokens <n> Maximum tokens in the reply.
--temperature <f> Sampling temperature.
--timeout-secs <n> 120 Request timeout.

gdc sessions

Inspect and manage saved sessions. No model needed.

gdc sessions list

gdc sessions list
Flag Default Description
--limit <n> 20 How many to show.
--all off Every project (not just the current one).
--cwd <path> current dir Scope to a specific project.
--root-only off Hide subagent sessions.
--tree off Show the parent/child tree.
--all-projects off Aggregate across every per-project database.

gdc sessions show

gdc sessions show <id>
Flag Description
--limit <n> Show only the last n messages.
--json Machine-readable output.
--with-audit Include the session's context-management history.

gdc sessions delete

gdc sessions delete <id>

Removes the session and everything under it. Confirms interactively unless --yes is passed.


gdc storage

Bulk data housekeeping. No model needed.

gdc storage gc

Delete every session older than a number of days.

gdc storage gc <days>
Flag Description
--dry-run Show how many would be removed, delete nothing.
--yes Skip the confirmation prompt.

gdc permissions

Inspect and revoke remembered approvals. Project-scoped by default. No model needed. See Permissions.

gdc permissions list

gdc permissions list
Flag Description
--all Every project.
--cwd <path> A specific project.
--server <name> Only approvals for a given MCP server.
--json Machine-readable output.

gdc permissions revoke

gdc permissions revoke <permission> <pattern>
gdc permissions revoke --all
Flag Description
--all Remove every approval in scope.
--server <name> Target an MCP-server approval.
--cwd <path> A specific project.
--yes Skip the confirmation prompt.

gdc memory

Manage memory notes. No model needed. Scopes are user, project, and local.

gdc memory list [--scope <scope>] [--cwd <path>] [--json]
gdc memory search <text> [--scope <scope>] [--json]
gdc memory show <name> [--scope <scope>] [--json]
gdc memory write <name> --description "<text>" --type <type> --scope <scope> --content "<text>"
gdc memory delete <name> --scope <scope>
  • --type is one of user, feedback, project, reference.
  • For write, pass --content - to read the body from standard input.
  • delete succeeds if it removed a note and reports if the name wasn't found.

gdc mcp

Manage external tool servers in your configuration. Edits preserve your comments and formatting. Default scope is the current project; add --scope user for user-wide.

gdc mcp list [--json]
gdc mcp add <name> <command> [--arg <a>]... [--env <K=V>]... [--trusted]
gdc mcp add-http <name> <url> [--auth-header <v>] [--header <K=V>]... [--trusted]
gdc mcp trust <name> [--no]
gdc mcp remove <name>
  • add registers a local program; repeat --arg for each argument.
  • add-http registers a remote service.
  • trust marks a server trusted; --no reverses it.

gdc plugins

Install and manage plugins. No model needed.

gdc plugins list [--json] [--cwd <path>]
gdc plugins install <source> --wasm <module> [--scope user|project] [--force]
gdc plugins remove <name> --scope user|project
  • <source> is the plugin's directory or manifest file.
  • install defaults to user scope; --force replaces an existing install.
  • remove requires an explicit --scope.

gdc hooks

Inspect configured hooks. Read-only — it lists configuration and doesn't run anything.

gdc hooks list [--json] [--cwd <path>]

gdc serve

Run gdc as a server. See the Admin guide for full detail; the flags are summarised there. Loopback-bound by default.

gdc serve --bind 127.0.0.1:8088

Key options include --bind, --profile, --output-style, the TLS options (--self-signed-tls, --tls-cert/--tls-key, the --acme-* family), and the swarm role options (--role, and its companions). See Running a server and TLS.


gdc swarm

Experimental

Distributed swarm is an advanced, evolving capability.

Set up and manage a distributed swarm.

gdc swarm init [--swarm-id <id>] [--bind <addr>]
gdc swarm invite [--expires <dur>] [--max-uses <n>] [--role <role>]...
gdc swarm join <url> [--role <role>]... [--tls-ca <path>]
gdc swarm members
gdc swarm status
gdc swarm kick <agent-id> [--reason <text>]
gdc swarm revoke <agent-id> [--reason <text>]
gdc swarm transfer-master <agent-id> --yes
gdc swarm dissolve --yes

See Swarm setup and Swarm operations.