Skip to content

CLI Reference

Use this page when you need the exact command surface: available commands, subcommands, arguments, and flags. The quick start shows the full agent loop with terminal transcripts; this page is the reference manual generated from the CLI help text.

This page is generated from the CLI's own help output during the docs build. Use it as the command map; runnable transcripts live in the quick start and workflow pages.

Command Map

agide indexes a codebase into a local structural map that agents and humans can query. It records symbols, calls, quality scores, git-derived churn, and searchable code context. Indexing is blocking: when `agide index` returns successfully, the store is ready for query commands.

agide [OPTIONS] <COMMAND>
Command What it does
agide index Build the structural and quality map for a workspace
agide status Show the index summary (packages, symbols, xrefs, …)
agide search Find code by intent
agide rank Quality dashboard / drill-down / per-symbol report card
agide query Navigate structural relationships
agide diff Review changes before shipping (pipe `git diff`)
agide callgraph Architecture view at package, file, or symbol level
agide metrics Per-symbol metric tables
agide history Query git and historical quality data
agide setup First-run setup (writes `.agide/config.toml`)
agide update Check for a newer agide and install it

Global Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help (see a summary with '-h')
-V, --version Print version

Top-Level Commands

agide callgraph

Architecture view at package, file, or symbol level

agide callgraph [OPTIONS]

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--format <FORMAT> Output format. `json` returns structured edges; `text`, `mermaid`, and `dot` return raw graph text [possible values: text, json, mermaid, dot]
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
--limit <LIMIT> Cap the number of strongest package edges [default: 50]
-h, --help Print help

agide diff

Review changes before shipping (pipe `git diff`)

agide diff [OPTIONS] <COMMAND>

Subcommands

Subcommand Description
agide diff review Risk-aware narrative review of a `git diff` on stdin

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help

agide history

Query git and historical quality data

agide history [OPTIONS] <COMMAND>

Subcommands

Subcommand Description
agide history sync Populate recent churn signals from git
agide history materialize Materialize commit/file/symbol intervals from git history
agide history log Show commits that touched a path
agide history symbol Show historical metrics for one symbol
agide history as-of Show one symbol's metrics as of a commit or ref

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help

agide index

Build the structural and quality map for a workspace

agide index [OPTIONS] <ROOT>

Arguments

Argument Description
<ROOT> Workspace root

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--format <FORMAT> Output format [possible values: text, json]
--include-tests Index test files (e.g. `*_test.go`, `*.test.ts`, `tests/`)
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
--exclude <EXCLUDE> Skip files whose paths contain any of these substrings
--verbose Print every phase event as a log line instead of the single-line progress bar. Useful for capturing reproductions or when piping stderr to a file
-h, --help Print help

agide metrics

Per-symbol metric tables

agide metrics [OPTIONS] [TARGET]

Arguments

Argument Description
[TARGET] Optional qname focus. Empty -> summary. Copy qnames exactly from CLI output

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--format <FORMAT> Output format [possible values: text, json]
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help

agide query

Navigate structural relationships

agide query [OPTIONS] <COMMAND>

Subcommands

Subcommand Description
agide query callers Inbound references: who calls this
agide query callees Outbound references: what this calls
agide query impact Blast radius: callers, tests, warnings, generated-file hits
agide query anatomy Symbols inside a file or package

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help

agide rank

Quality dashboard / drill-down / per-symbol report card

agide rank [OPTIONS] [TARGET]

Arguments

Argument Description
[TARGET] Optional dimension or qname. `combined`/empty → overall ranking; `complexity`/`coupling`/`churn`/`side-effects`/`ambiguity` -> drill-down; otherwise -> per-symbol report card. Copy qnames exactly from CLI output

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--format <FORMAT> Output format [possible values: text, json]
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
--limit <LIMIT> Cap result count [default: 10]
-h, --help Print help

agide setup

First-run setup (writes `.agide/config.toml`)

agide setup [OPTIONS]

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help

agide status

Show the index summary (packages, symbols, xrefs, …)

agide status [OPTIONS]

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--format <FORMAT> Output format. Default: `text` [possible values: text, json]
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help

agide update

Check for a newer agide and install it

agide update [OPTIONS]

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help

Nested Commands

agide diff review

Risk-aware narrative review of a `git diff` on stdin

agide diff review [OPTIONS]

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--format <FORMAT> Output format [possible values: text, json]
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help

agide history as-of

Show one symbol's metrics as of a commit or ref

agide history as-of [OPTIONS] --qname <QNAME> <SHA>

Arguments

Argument Description
<SHA> Commit SHA or ref

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--qname <QNAME> Symbol qname
--format <FORMAT> Output format [possible values: text, json]
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help

agide history log

Show commits that touched a path

agide history log [OPTIONS] <PATH>

Arguments

Argument Description
<PATH> Project-relative path

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--format <FORMAT> Output format [possible values: text, json]
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help

agide history materialize

Materialize commit/file/symbol intervals from git history

agide history materialize [OPTIONS]

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--format <FORMAT> Output format [possible values: text, json]
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help

agide history symbol

Show historical metrics for one symbol

agide history symbol [OPTIONS] <QNAME>

Arguments

Argument Description
<QNAME> Symbol qname. Copy exactly from search/rank output; short names are resolved when unambiguous

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--format <FORMAT> Output format [possible values: text, json]
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help

agide history sync

Populate recent churn signals from git

agide history sync [OPTIONS]

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--format <FORMAT> Output format [possible values: text, json]
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help

agide query anatomy

Symbols inside a file or package

agide query anatomy [OPTIONS] <TARGET>

Arguments

Argument Description
<TARGET> File path or package import path

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--format <FORMAT> Output format [possible values: text, json]
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help

agide query callees

Outbound references: what this calls

agide query callees [OPTIONS] <QNAME>

Arguments

Argument Description
<QNAME> Symbol qname. Copy exactly from search/rank output; separators are language-specific

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--format <FORMAT> Output format [possible values: text, json]
--depth <DEPTH> Transitive depth (1 = direct) [default: 1]
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
--limit <LIMIT> Cap result count [default: 10]
-h, --help Print help

agide query callers

Inbound references: who calls this

agide query callers [OPTIONS] <QNAME>

Arguments

Argument Description
<QNAME> Symbol qname. Copy exactly from search/rank output; separators are language-specific

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--format <FORMAT> Output format [possible values: text, json]
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
--limit <LIMIT> Cap result count [default: 10]
-h, --help Print help

agide query impact

Blast radius: callers, tests, warnings, generated-file hits

agide query impact [OPTIONS] <QNAME>

Arguments

Argument Description
<QNAME> Symbol qname. Copy exactly from search/rank output; separators are language-specific

Options

Option Description
--explain Add the underlying inputs that drove each verdict to the output. Off by default — the standard output is short and prose-like
--format <FORMAT> Output format [possible values: text, json]
--json Emit a stable JSON envelope. Shortcut for `--format json` on commands that expose a format flag
-h, --help Print help