CodeMap

[!Caution]
CodeMap is currently in active development. Use with caution and expect breaking changes.
Overview
CodeMap is an AI-powered developer toolkit designed to enhance your coding workflow. It offers features for code analysis, documentation generation, semantic search, and Git process streamlining—all accessible through an interactive CLI with multi-LLM support.
[!Important]
For detailed information on all features and commands, please visit our documentation site: codemap.run
Features
- 📄 Generate Documentation: Create optimized markdown documentation and visualize repository structures.
- 📝 Smart Commits: Get AI-generated commit messages based on semantic analysis of your changes.
- 🔃 AI-Powered PRs: Streamline pull request creation and management with intelligent suggestions.
- 💬 AI Chat: Ask questions about your codebase using RAG and LLMs.
- 🔍 Index & Search: Build a semantic vector index and search your repository for deep code understanding.
- 🤖 LLM Support: Integrate with various LLM providers via PydanticAI.
Quick Start
[!Important]
CodeMap currently only supports Unix-based platforms (macOS, Linux). Windows users should use WSL.
[!Tip]
After installation, use codemap or the alias cm.
Installation
Ensure uv is installed:
curl -LsSf https://astral.sh/uv/install.sh | sh
Install CodeMap globally:
uv tool install codemap
Key Commands
Configuration
CodeMap can be configured using a .codemap.yml file in your project root. Generate a default config with:
cm conf
For a full list of configuration options and examples, refer to the Configuration Guide on our documentation site.
Environment Variables
Add your LLM API keys to .env or .env.local in your project root. See LLM Support for details.
Development Setup
Interested in contributing? Please read our Code of Conduct and Contributing Guidelines.
- Clone:
git clone https://github.com/SarthakMishra/codemap.git && cd codemap
- Prerequisites: Install Task, uv, and Python 3.12+.
- Setup Env:
uv venv && source .venv/bin/activate (or appropriate activation command for your shell)
- Install Deps:
uv sync --dev
- Verify:
task -l lists available tasks. task ci runs checks and tests.
Detailed contribution instructions are in the Contributing Guide.
Acknowledgments
CodeMap relies on these excellent open-source libraries and models:
Core Dependencies
- PydanticAI - Unified interface for LLM providers
- Pydantic - Data validation library for Python
- Questionary - Interactive user prompts
- Rich - Beautiful terminal formatting and output
- Typer - Modern CLI framework for Python
- Model2Vec - Text embeddings for semantic code analysis
- Tree-sitter - Robust parsing system for code analysis
- SQLModel - SQL database integration with Python
- Qdrant - Vector search engine for semantic analysis
- PyGit2 - Git repository manipulation
- Scikit-learn - Machine learning utilities
- PyGithub - GitHub API integration
- Docker SDK - Docker container management
- Watchdog - Filesystem event monitoring
License
This project is licensed under the MIT License - see the LICENSE file for details.