Skip to main content

CLI tool that generates optimized markdown docs and streamline Git workflows

Project description

CodeMap

PyPI Python Version Tests Lint CodeQL codecov Codacy Badge pre-commit Interrogate License

[!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

  • Generate Documentation:
    cm gen path/to/source
    
  • Smart Commits:
    cm commit
    
  • AI-Powered PRs:
    cm pr
    
  • AI Chat:
    cm ask "Which module is responsible for managing auth tokens?"
    
  • Index & Search:
    cm index
    

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.

  1. Clone: git clone https://github.com/SarthakMishra/codemap.git && cd codemap
  2. Prerequisites: Install Task, uv, and Python 3.12+.
  3. Setup Env: uv venv && source .venv/bin/activate (or appropriate activation command for your shell)
  4. Install Deps: uv sync --dev
  5. 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.

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-0.3.1rc1.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

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

codemap-0.3.1rc1-py3-none-any.whl (256.3 kB view details)

Uploaded Python 3

File details

Details for the file codemap-0.3.1rc1.tar.gz.

File metadata

  • Download URL: codemap-0.3.1rc1.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.7

File hashes

Hashes for codemap-0.3.1rc1.tar.gz
Algorithm Hash digest
SHA256 fa9d1e3de187d307e1ea147d284146874e4dda8876d8f9f343a390146a12e1ee
MD5 7d329eaad5fb2793e5555c91f0e374a4
BLAKE2b-256 5cb482de8b16dd468d128d60722e89c0b40de25107c257227a77bdc2560c092b

See more details on using hashes here.

File details

Details for the file codemap-0.3.1rc1-py3-none-any.whl.

File metadata

  • Download URL: codemap-0.3.1rc1-py3-none-any.whl
  • Upload date:
  • Size: 256.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.7

File hashes

Hashes for codemap-0.3.1rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 e03e707e6c55bcb0a09d52ec40ac7f618e3012fdc596a010e5ffb4f7f3857eec
MD5 90498227c280684124d4183bdadf86a6
BLAKE2b-256 70a02ad467e10d9e2a3daba25f985c0abac2f6fd32f3fc4a33c51038a633e28d

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