Skip to main content

Zero-LLM project scanner for AI agents. Produces a compact project map so AI uses 50-100x fewer tokens to understand your codebase.

Project description

codemap

Zero-LLM project scanner for AI agents. Scan any codebase and get a compact project map so AI uses 50-100x fewer tokens to understand your code.

PyPI Python License: MIT GitHub

What it does

Your Project (50,000+ lines)  →  codemap  →  PROJECT_MAP.md (~3K tokens)
                                           →  codemap.json (full graph)
                                           →  codemap.html (interactive viz)
  • AST-level extraction — parses 20+ languages via tree-sitter
  • Dependency graph — imports, calls, class hierarchies as a directed graph
  • Community detection — auto-discovers logical modules (Louvain/Leiden)
  • Architecture analysis — god nodes, circular deps, dead code, layers
  • Zero LLM tokens — everything is deterministic static analysis

Install

pip install codemap

With extras:

pip install codemap[web]   # web dashboard (Flask)
pip install codemap[ai]    # AI assistant (vedaslab.in API)
pip install codemap[all]   # everything

Quick Start

Scan a project

codemap scan .

Generates PROJECT_MAP.md, codemap.json, and codemap.html in the current directory.

Interactive menu

codemap menu .

Choose actions by number — scan, launch dashboard, AI assistant, stats.

Web dashboard

codemap serve .

Opens a professional web dashboard at http://localhost:8787 with interactive graph visualization, module explorer, and complexity analysis.

AI assistant

export VEDASLAB_API_KEY=your-key
codemap ai .

Chat with AI about your project using multiple providers (Vedaslab.in, OpenAI, Google Gemini, Anthropic Claude). The AI gets full project context from the scan.

CLI Reference

codemap scan [TARGET] [OPTIONS]    Scan project and generate maps
  -o, --output DIR                 Output directory (default: .)
  --no-html                        Skip HTML generation
  --no-json                        Skip JSON export

codemap serve [TARGET] [OPTIONS]   Launch web dashboard
  -p, --port PORT                  Port (default: 8787)
  --host HOST                      Host (default: 127.0.0.1)

codemap ai [TARGET] [OPTIONS]      Interactive AI assistant
  --api-key KEY                    API key (supports vedaslab, openai, gemini, claude)
  --model MODEL                    Model name (e.g. gpt-4o, gemini-2.5-pro)

codemap menu [TARGET]              Interactive menu mode

Supported Languages

Python, JavaScript, TypeScript, TSX, Go, Rust, Java, C, C++, C#, Ruby, Kotlin, Scala, PHP, Swift, Lua, Zig, PowerShell, Elixir, Julia — plus Markdown, JSON, YAML, TOML configs.

How It Works

  1. Detect — finds project type, frameworks, entry points, file structure
  2. Extract — parses every source file into AST nodes (files, classes, functions, imports)
  3. Build — constructs a directed graph with import/call/containment edges
  4. Cluster — detects communities using Louvain algorithm, auto-labels them
  5. Analyze — finds god nodes, entry points, circular deps, dead code, architecture patterns
  6. Report — generates a token-optimized Markdown summary
  7. Export — outputs JSON graph data and interactive HTML visualization

Development

git clone https://github.com/Jerry4539/codemap.git
cd codemap
pip install -e ".[dev]"
codemap scan .

Contributing

Contributions are welcome! Please open an issue or pull request on GitHub.

License

MIT — see LICENSE for details.


Developed by Jerry4539

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codemap_zero-0.1.0.tar.gz (59.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codemap_zero-0.1.0-py3-none-any.whl (62.6 kB view details)

Uploaded Python 3

File details

Details for the file codemap_zero-0.1.0.tar.gz.

File metadata

  • Download URL: codemap_zero-0.1.0.tar.gz
  • Upload date:
  • Size: 59.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for codemap_zero-0.1.0.tar.gz
Algorithm Hash digest
SHA256 79df63c281fbe1647d6dcf6767063c05da3001554db0a1393ab92646c8f92826
MD5 1df5a3b43aace704b19fd02c2d4af01a
BLAKE2b-256 ba4f97e971abbd77711015087459ce316ae2daaa395c0b74a16b01d72ce7fb32

See more details on using hashes here.

File details

Details for the file codemap_zero-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: codemap_zero-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 62.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for codemap_zero-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db56d474bdd1ce3a5f5f8c655f8999f6315646e1738d5e70fa1406db9f795a36
MD5 0ac77f83287ab6bc341894ef21705efa
BLAKE2b-256 66da14946a4205f9a74007dd9cee6e6ba506979f0390fafdb2ddd75e0e0a6a49

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page