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

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-zero  →  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-zero

With extras:

pip install codemap-zero[web]   # web dashboard (Flask)
pip install codemap-zero[ai]    # AI assistant (vedaslab.in API)
pip install codemap-zero[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-zero.git
cd codemap-zero
pip install -e ".[dev]"
codemap scan .

Contributing

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

Note: The PyPI package name is codemap-zero (pip install codemap-zero), but the CLI command is codemap.

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.1.tar.gz (59.5 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.1-py3-none-any.whl (62.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: codemap_zero-0.1.1.tar.gz
  • Upload date:
  • Size: 59.5 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.1.tar.gz
Algorithm Hash digest
SHA256 61ce063567d2330bc09f5b4893b8dfe75856117955c1d1ada559db6caf89bec8
MD5 3b6c02d0b537c3be796a1b95365cd79c
BLAKE2b-256 2a16285bceace52afb9e5d02d12bb1f0d34eceb60c1e6c8b52dbde087989c23e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codemap_zero-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 62.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f3b0b87417210851068c839445662a56a7b69aca43e090286353f06082c8efa
MD5 7f284c0082eb72ee73bb922ed74cdeb4
BLAKE2b-256 75c96279a0072aa47a3c693780bbd3d69c8e80f22418d7c036387a61972d3588

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