Generate a comprehensive summary and visualization of a repository structure, enhanced with AI-powered descriptions and developer considerations.
Project description
๐บ๏ธ repo-map
An intelligent repository mapper that uses AI to create comprehensive, visual summaries of your codebase.
repo-map is an advanced tool for generating comprehensive, AI-enhanced summaries of software repositories. It provides developers with valuable insights into project structures, file purposes, and potential considerations across various programming languages. Using efficient caching, repo-map only processes files that have changed since the last run, making it ideal for continuous use in evolving projects. This tool not only aids in understanding and documenting codebases but can also assist LLM agents in writing accurate and functional code within your existing project structure.
๐ Key Features
- ๐ Detailed Repository Summaries: Generates a tree-like visualization of your repository structure.
- ๐ง AI-Powered Enhancements: Get AI-generated descriptions, developer considerations, and more.
- ๐ Multi-Language Support: Analyzes code structure across Python, Java, JavaScript, TypeScript, and more.
- ๐ Efficient Caching: Uses SQLite to only process files that have changed since the last run.
- ๐ Markdown Output: Generates a clean Markdown file for easy sharing and documentation.
- ๐ Gitignore Respect: Respects your root
.gitignorefile and includes a robust set of default ignore patterns. - โก Async Processing: Utilizes asynchronous processing for improved performance.
๐ ๏ธ Installation
-
Clone the repository:
git clone https://github.com/cyanheads/repo-map.git cd repo-map
-
Install dependencies using Poetry:
poetry install
๐ Usage
To generate a repository map, run the following command from the project root:
poetry run repo-map <repository_path> [options]
Replace <repository_path> with the path to the repository you want to analyze.
Options
-y,--yes: Automatically accept the disclaimer and proceed without prompting.--model MODEL: Specify the OpenRouter LLM model to use (default:google/gemini-2.5-flash-preview-09-2025).--concurrency INT: Set the number of concurrent API calls (default: 3).
Examples
# Basic usage
repo-map /path/to/your/repo
# Use a specific model
repo-map /path/to/your/repo --model "google/gemini-2.5-flash-preview-09-2025"
# Auto-accept disclaimer
repo-map /path/to/your/repo -y
๐ Example: Snake Game Repository Map
Here's an example of a repo-map generated for an advanced Snake game implemented in Python:
/ (SSSnakeGame)
โโโ main.py (Python)
โ โโโ Description: Entry point for the Snake game, initializes the game environment and runs the main event loop.
โ โโโ Developer Consideration: "The game loop is tightly bound to Pygame's event system; any significant changes will require familiarity with Pygame's architecture."
โ โโโ Maintenance Flag: Stable
โ โโโ Architectural Role: Entrypoint
โ โโโ Code Quality Score: 8/10
โ โโโ Refactoring Suggestions: "Isolate game state management from the rendering logic to improve testability and reduce complexity."
โ โโโ Security Assessment: "None"
โโโ config.py (Python)
โ โโโ Description: Centralizes all static configuration parameters for the game, such as screen dimensions, colors, and snake speed.
โ โโโ Developer Consideration: "Changing screen dimensions may require adjustments to the food spawning logic to ensure it appears within bounds."
โ โโโ Maintenance Flag: Volatile
โ โโโ Architectural Role: Configuration
โ โโโ Code Quality Score: 9/10
โ โโโ Refactoring Suggestions: "Consider using a more structured configuration format like YAML or JSON for easier management, especially if settings become more complex."
โ โโโ Security Assessment: "None"
โโโ assets/
โ โโโ images/
โ โ โโโ snake_head.png (Image)
โ โ โโโ food.png (Image)
โ โโโ sounds/
โ โโโ eat.wav (Audio)
โ โโโ game_over.mp3 (Audio)
โโโ requirements.txt (Text)
โ โโโ Description: Lists all Python package dependencies required to run the project, such as `pygame`.
โโโ README.md (Markdown)
โโโ Description: Provides a comprehensive overview of the project, including setup instructions, gameplay details, and contribution guidelines.
โโโโโโโโโโโโโโโ
๐ Configuration
Before using repo-map, you need to set up your OpenRouter API key. Set the following environment variable:
export OPENROUTER_API_KEY=your_api_key_here
Replace your_api_key_here with your actual OpenRouter API key.
๐งฉ How It Works
- Walks through the repository directory structure.
- Analyzes file contents and extracts key information (imports, functions, classes).
- Utilizes an LLM (via OpenRouter) to generate descriptions and developer considerations.
- Caches results in SQLite for efficient processing of unchanged files.
- Generates a comprehensive tree-like structure of the repository.
- Saves the output as a Markdown file for easy viewing and sharing.
๐ค Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
๐ก๏ธ License
This project is licensed under the Apache 2.0 License. See the LICENSE file in the root directory of this project for the full license text.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file repo_map-0.5.0.tar.gz.
File metadata
- Download URL: repo_map-0.5.0.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.10 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2234e25250abbb8e761bfc2ee8153c598746daa7c784c1772ebeba4230204f29
|
|
| MD5 |
c25263fdee88d4b2978e756c20fb3b43
|
|
| BLAKE2b-256 |
bcdefe8175a953edfa2e3570060ec682cbad6e904945d819b81d1b6f6ff71dd5
|
File details
Details for the file repo_map-0.5.0-py3-none-any.whl.
File metadata
- Download URL: repo_map-0.5.0-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.10 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc134c2eee2499168cf48c711ce0d762146cff46331419604804bb37939f738a
|
|
| MD5 |
4f77176eea53635e0bc8fffb7a08c495
|
|
| BLAKE2b-256 |
428d2adbcea094e8d7d764d73791ba374f5db442b1636f2879d5c604fa06c6cb
|