Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Documentation / Advanced


Advanced

Nerds Section

Codanna respects .gitignore and adds its own .codannaignore.

Unix-Native. Pipe it, baby!

Codanna speaks CLI like you do, positional when it's simple, key:value when it's not. All MCP tools support --json, so piping isn't noise, it's music.

In This Section

Quick Examples

Semantic Search with Language Filter

codanna mcp semantic_search_with_context query:"error handling" limit:2 lang:rust --json | jq -r '.data[] | "\(.symbol.name) (\(.symbol.scope_context)) (score: \(.score)) - \(.context.file_path) - \(.symbol.doc_comment)"'

Build Complete Call Graphs

# Find a symbol, show what it calls, and trace one level deeper
codanna mcp semantic_search_with_context query:"file processing" limit:1 --json | \
jq -r '.data[0].symbol.id' | \
xargs -I {} sh -c '
  echo "=== Symbol ID: {} ==="
  codanna mcp get_calls symbol_id:{} --json | jq -r ".data[]? | \"\(.name) [symbol_id:\(.id)] - \(.file_path):\(.range.start_line)-\(.range.end_line)\""
'

Using symbol_id for Unambiguous Queries

# Extract symbol_id from search results and use for precise follow-up
codanna mcp semantic_search_with_context query:"error handling" limit:1 --json | \
jq -r '.data[0] | "Symbol: \(.symbol.name) [symbol_id:\(.symbol.id)]"'

# Direct lookup by ID (no ambiguity)
codanna mcp get_calls symbol_id:1883 --json | jq -r '.data[] | "\(.name) [symbol_id:\(.id)]"'

Extract System Messages

System messages guide agents toward the next hop. Humans don't see them, but piping with jq reveals them:

codanna mcp find_callers walk_and_stream --json | jq -r '.system_message'
# Output: Found 18 callers. Run 'analyze_impact' to map the change radius.

Why It Matters

  • Fewer round trips. The agent self-proposes the next command.
  • Less narration. More execution.
  • Grep-and-hope becomes directed hops.

Next Steps

Back to Documentation