Astrograph

Commands

The Astrograph CLI command reference.

Every command is one-shot, scriptable, and pipeable. Run astrograph <command> --help for full flags.

Index lifecycle

CommandWhat it does
astrograph initCreate .astrograph/ and run the first full index.
astrograph syncReconcile the graph with on-disk changes (content-hash diff).
astrograph statusIndex health: counts, coverage, backend, freshness.
astrograph stopStop a running background watcher/daemon.

Querying the graph

Find symbols by name across the project.

astrograph search AuthProvider --kind class --limit 10

context

Build ranked task context — entry points, related symbols, and verbatim code slices — with a coverage banner. The go-to for "how does X work?".

astrograph context "how does session refresh work?"

callers / callees

Walk the call graph in either direction.

astrograph callers useAccount
astrograph callees AuthProvider

impact

Reverse-reachability — what could a change to this symbol affect.

astrograph impact AuthProvider --depth 2

trace

Find how one symbol reaches another.

astrograph trace login refreshToken

node / explore

Inspect a single symbol's source, or explore source around a query.

astrograph node refreshSession
astrograph explore "session"

files

List indexed files as a tree, flat, or grouped.

astrograph files --format tree

Agent integration

CommandWhat it does
astrograph serve --mcpStart the stdio MCP server for agents.
astrograph installInstall the MCP config + agent guide into supported hosts.
astrograph uninstallRemove Astrograph-owned config and guide files.

See MCP & skills for host-by-host setup.

Honest results

Every query reports a coverage banner — coverage R/T resolved · partial: yes/no — and flags external, unresolved, and ambiguous references. Partial or stale results are never presented as complete facts.

On this page