Global Flags
These flags work on every command:Commands
Index Flags
Retrieve Subcommands
All retrieve subcommands support:
--jsonfor JSON output--fields <fields>to filter JSON output to specific data fieldslang:<language>filter (e.g.,lang:rust)
Retrieve Search Filters
Filters also work as key:value pairs:
Dump
Stream the whole index as JSON Lines: abegin envelope, one result envelope per symbol and per relationship, and a terminal summary envelope. Every line is the standard JSON envelope; row ordering is unspecified. Available since v0.14.0.
summary envelope closes the stream with totals and index provenance:
Scalar
line fields (endpoint line, metadata line) are 1-indexed editor coordinates; range objects on symbol rows are 0-indexed machine coordinates. id values are scoped to the current index instance and change across re-indexes — identify symbols durably by name, file, line, and kind.--relation or --kind value is rejected before any line is written (exit 2, accepted values listed on stderr). A stale index refuses with exit 7 as on every read command.
MCP Tools
See Tool Tiers for recommended usage patterns.
MCP Flags
MCP Test
Test MCP server connectivity and tool execution:Serve Options
Documents Subcommands
Documents Flags
See Document Search for details.
Profile Subcommands
Profile Install Flags
See Collaboration for details.
Parse Flags
Benchmark
Benchmark parser performance for one or all languages:Key:Value Arguments
Retrieve, MCP, and documents commands accept arguments as key:value pairs:Exit Codes
An index built by a binary with different output semantics is refused before any tool runs: read commands exit
7 with a message naming both versions, and codanna index rebuilds from scratch automatically. This prevents mixed-semantics results after an upgrade. The automatic rebuild also re-embeds when semantic search is enabled; large repositories take minutes. Since v0.10.1, a stale-index codanna serve (stdio) completes the MCP handshake with no tools and rebuild instructions, so MCP clients report the fix instead of a generic connection failure.