Views
No views yet
pip install -r requirements.txttree-sitter, tree-sitter-python, tree-sitter-javascript, tree-sitter-go, tree-sitter-java, networkx, rich, click, pydanticpython -m codegraph build /path/to/your/codebase -o graph.json1# Find any entity by name
2python -m codegraph find DataProcessor
3
4# Fuzzy search across names and paths
5python -m codegraph search helper
6
7# Show file outline
8python -m codegraph outline src/core.py1python -m codegraph map-error "NameError: name 'helper_c' is not defined" \
2 --file src/core.py --line 16Error Type: name_error
Message: NameError: name 'helper_c' is not defined
Mapped to: 🔩 method process in /app/src/core.py:15
Related entities:
- 📄 file core.py (/app/src/core.py:1)
- 🔧 function helper_a (/app/src/utils.py:4)
- 🔧 function helper_b (/app/src/utils.py:8)
Suggested fix: Check spelling of 'process' or ensure the variable/function is defined before use.codegraph/
├── __init__.py # Package init
├── models.py # Pydantic models (Entity, Relationship, ErrorMapping)
├── parser.py # Multi-language AST parser (tree-sitter)
├── graph_builder.py # NetworkX graph construction + relationship extraction
├── query_engine.py # Error mapping, search, navigation APIs
├── cli.py # Click CLI with Rich output
└── __main__.py # python -m codegraph entry pointpip install tree-sitter-<lang>parser.py (LANG_MAP)_handle_<lang>_<node_type>models.RelationTypegraph_builder.RelationshipExtractorquery_engine.QueryEnginepython -m pytest tests/ -v