| name | eagraph |
| description | Code knowledge graph for navigating multi-repo codebases. ALWAYS use eagraph instead of multiple glob/grep/read calls when investigating code structure, callers/callees, dependencies, or file contents. One eagraph call replaces 5-15 tool calls. |
eagraph: Code Knowledge Graph
Use eagraph FIRST before resorting to glob/grep/read for any code navigation task. It is faster, cheaper, and returns structured results.
--repo is optional on all commands. eagraph auto-detects the repo from the current working directory.
All commands support --json for structured output: eagraph --json <command> ...
Data is always fresh. eagraph auto-refreshes stale files before every query.
When to use
- Understanding a symbol →
eagraph --json context <name> --repo <repo>
- Finding callers/dependents →
eagraph --json dependents <file> --repo <repo>
- File structure →
eagraph --json symbols <file> --repo <repo>
- Tracing call chains →
eagraph --json chain <from> <to> --repo <repo>
- Finding symbols by name →
eagraph --json query <name> --repo <repo>
--repo goes AFTER the subcommand. It auto-detects from cwd if omitted, but always include it to be safe. Check eagraph --json status for repo names.
Commands
Get structural context for a symbol
eagraph --json context <symbol-name> --repo <repo> --depth 2 --limit 50
Returns the symbol's source code, all symbols it calls/imports/inherits, and all symbols that call/import/inherit it, with source snippets. Use --depth 2 or --depth 3 for deeper traversal. Use --limit N to cap the number of returned neighbors (prevents output explosion on highly-connected symbols). Neighbors are sorted by distance from the root symbol, so the limit keeps the closest ones.
Get dependents of a file
eagraph --json dependents <file-path> --repo <repo> --limit 50
Returns every symbol in the file and what depends on each one. File path is relative to the repo root. --limit N caps neighbors per symbol.
List all symbols in a file
eagraph --json symbols <file-path> --repo <repo>
Table of contents for a file: every function, class, method with line ranges. Use this instead of reading entire files to understand structure.
Find shortest call path between two symbols
eagraph --json chain <from-symbol> <to-symbol> --repo <repo>
Search for symbols by name
eagraph --json query <name> --repo <repo>
Check index status
eagraph --json status
Re-index a repo
eagraph index <repo-name>
eagraph index <repo-name> --force
Interactive graph visualization
eagraph viz
Starts a local web server with an interactive force-directed graph.
Tips
--repo goes after the subcommand, not before it. Always include it.
- Use
--json for all queries.
- Use
context as the first step when investigating any symbol.
- Use
symbols to understand a file's structure without reading it.
- Use
dependents before making changes to understand impact.
- Depth 1 is usually enough. Use depth 2-3 for longer chains.
Installation
ln -s /path/to/eagraph/skill ~/.claude/skills/eagraph
ln -s /path/to/eagraph/agent/eagraph-explorer.md ~/.claude/agents/eagraph-explorer.md
The agent ensures subagents use eagraph for code navigation instead of raw grep/glob/read.