Analyze the structure of any Python project in seconds.
Find core modules, orphans, import cycles, and dead functions.
- Core files — which modules are imported the most
- Orphans — files nobody imports (candidates for deletion)
- Dead functions — functions defined but never called
- Import cycles — circular dependencies between modules
Fully offline. Parses Python source code with ast module, builds an import graph, and runs graph algorithms (centrality, cycle detection).
git clone https://github.com/Nekeos/code-analyzer.git cd code-analyzer pip install networkx # optional, for cycle detection
python cli.py /path/to/python/project python cli.py /path/to/python/project --detail
Python 3.8+ networkx (optional)
code-analyzer/ core.py # parser and analyzer cli.py # command-line interface README.md # this file
MIT