JohnXu22786/codegraph
CodeGraph parses a codebase into a queryable SQLite index so agents can answer structural questions - who calls this function, what a module depends on, what a symbol change would impact - over a call graph, dependency graph, FTS5 full-text search and incremental re-indexing, exposed through a CLI, a Python API and a stdio tool server.
CodeGraph parses a codebase into a queryable SQLite index so agents can answer structural questions instead of grepping. It provides a call graph (callers/callees), a dependency graph (deps/dependents distinguishing internal from external resolution), local full-text search over symbol names, docstrings and signatures via SQLite FTS5, transitive impact analysis, incremental re-indexing that re-parses only content-changed files and cleans up deleted ones, and export dot|json for Graphviz or visualization tools. Cross-file resolution is heuristic and priority-ordered, with unresolved external call sites kept as raw text, and the tool server caches read-only queries with a 30-second TTL.
Install
dsh plugin --profile demo add github:JohnXu22786/codegraphCopied verbatim from the README's install line (the README's Quick start also lists a dsh plugin --profile demo remove dsh-codegraph form); the profile name is used exactly as the README shows it.
Compatibility
Ships a CLI, a Python API and a stdio tool server (MCP-style JSON-RPC 2.0) that any plugin-based harness can load as a subprocess. Supported languages are Python, JavaScript, TypeScript, Go, Java and Rust; two parse engines (tree-sitter when installed, otherwise a zero-dependency regex scanner) are chosen automatically.
Details
- Repo: JohnXu22786/codegraph
- Category: Coding & Development
- Stars: 3
- Version: GitHub repo JohnXu22786/codegraph (3★); installed from GitHub (no npm package documented). Python 3.10+, standard library + SQLite only (no mandatory third-party dependencies); optional tree-sitter grammars sharpen parsing. English README with a Simplified Chinese translation.
Alternatives
030611/dsh-context-provenance · 030611/qiushi-dsh-evidence-audit · 0x3fffff/dsh-desktop-launcher