Code context mapping for AI agents - analyze Python import relationships and dependencies.
pip install -e .Analyze a Python repository:
# Analyze repository and save graph
python -m codex_aura.cli.main analyze /path/to/repo -o graph.json
# Show graph statistics
python -m codex_aura.cli.main stats graph.jsonSee which files are affected when you change a source file:
# First, analyze the repository
python -m codex_aura.cli.main analyze examples/simple_project -o graph.json
# Show impact of changing utils.py
python examples/demo_affected.py graph.json src/utils.pyOutput:
🎯 Analyzing impact of changes to: src/utils.py
📥 Files that IMPORT this file (will be affected):
• src/services/user.py (line 1)
• src/main.py (line 1)
📤 Files that this file IMPORTS (dependencies):
• src/config.py (line 1)
🔄 Total impact: 3 files
Visualize import relationships as an ASCII tree:
# Visualize imports starting from main.py
python examples/demo_visualize.py graph.json src/main.py --depth 2Output:
src/main.py
├── imports: src/utils.py
│ └── imports: src/config.py
├── imports: src/services/user.py
│ ├── imports: src/utils.py
│ └── imports: src/services/models/user.py
Show detailed statistics about the analyzed codebase:
python -m codex_aura.cli.main stats graph.jsonMeasure performance on real repositories:
# Benchmark on a large repository
python examples/benchmark.py /path/to/large/repoExample output:
Benchmark: flask (127 files, 45K LOC)
Scan files: 0.05s
Parse AST: 0.82s
Build graph: 0.15s
Total: 1.02s
Performance: 44K LOC/sec
Создание бэкапа (dump будет сохранён в ./backups):
./scripts/neo4j_backup.shВосстановление из dump:
./scripts/neo4j_restore.sh neo4j_YYYYMMDD_HHMMSS.dumpПеременные окружения для настройки:
BACKUP_DIR— путь к каталогу с бэкапами (по умолчанию./backups)CONTAINER_NAME— имя контейнера Neo4j (по умолчаниюcodex-aura-neo4j-1)
We welcome contributions! Please see our Contributing Guide for details on:
- How to set up a development environment
- Code style guidelines
- How to run tests and linting
- Pull request process
Licensed under the Apache License, Version 2.0.