Query and analyze the codebase using CodeEagle's knowledge graph. Provides structured code data (symbols, interfaces, edges), impact analysis, design review, and general Q&A — all grounded in an indexed knowledge graph. Use this FIRST before reading source files.
Query and analyze the codebase using CodeEagle's knowledge graph. Provides structured code data (symbols, interfaces, edges), impact analysis, design review, and general Q&A — all grounded in an indexed knowledge graph. Use this FIRST before reading source files.
allowed-tools
Bash(codeeagle *)
CodeEagle — Codebase Intelligence
Use CodeEagle to understand the codebase without reading source files directly.
Pick the right command based on what you need:
Decision Matrix
Need
Command
Function signatures, types in a file
codeeagle query symbols --file <path>
Interface definition + implementors
codeeagle query interface --name <name>
Function call graph (who calls what)
codeeagle query edges --node <name> --type Calls
What a function depends on
codeeagle query edges --node <name> --type Calls --direction out
Who calls a function
codeeagle query edges --node <name> --type Calls --direction in
codeeagle query unused
codeeagle query unused --type Function --language go
codeeagle query unused --include-exported --package mypackage
Finds functions/methods with no incoming Calls edges. Test functions, init(), and main() are excluded.
By default excludes exported functions (they may be called externally). Use --include-exported to include them.
Show test coverage
codeeagle query coverage
codeeagle query coverage --level function
codeeagle query coverage --language go --package parser
Reports which files (default) or functions have test coverage via EdgeTests edges.
Shows per-package coverage percentages.
Non-code files are automatically indexed as Document nodes, including:
Office documents: DOCX, PPTX, XLSX (text extracted from ZIP/XML, pure Go)
OpenDocument: ODT, ODS, ODP (text extracted from content.xml)
PDF: text extracted via dslipak/pdf (pure Go)
Text files: changelogs, CSVs, config templates, design docs
Images: PNG, JPG, GIF, WebP, BMP, TIFF (described by LLM if available)
When a docs LLM provider is available (Ollama or Vertex AI), topics are extracted
and linked via HasTopic edges. Directory hierarchy is represented as Directory
nodes with Contains edges.
codeeagle query edges --node <name> --type Tests — find existing tests for a symbol
codeeagle query coverage --level function --package <pkg> — check test coverage gaps
codeeagle agent plan "<what you plan to change>" — assess impact and risk
Prerequisites
CodeEagle must be installed and on PATH
Project must be initialized (codeeagle init) with an indexed graph (codeeagle sync)
Tips
Run commands concurrently. All codeeagle query and codeeagle rag commands are read-only and safe to run in parallel. When you need multiple pieces of information, launch them as parallel Bash calls in a single message rather than sequentially. For example, query symbols for 3 files simultaneously, or run rag and query edges at the same time.
Structured queries and rag are instant; AI agents take 10-20 seconds
Use rag for natural language search ("find code that handles X"); use query for exact lookups
Use --type Calls --direction out to see what a function depends on
Use --type Calls --direction in to find all callers of a function
Use --type DependsOn to trace imports through to manifest dependencies
Use --type Tests to find which tests cover a given file or function
Use query unused to find dead code; query coverage for test gaps
All query and rag commands support --json for machine-readable output
Prefer structured queries for implementation planning, AI agents for understanding