repo-map scans a repository, extracts structural metadata, and asks an OpenRouter model to document eligible files. It writes a Markdown tree at the repository root and stores results in SQLite so unchanged files do not need another API call.
Features
- Markdown and console repository trees
- Python AST extraction plus lightweight Java, JavaScript, TypeScript, and C# structure parsing
- Structured descriptions, developer considerations, maintenance flags, dependency notes, architectural roles, refactoring suggestions, and security assessments
- Root
.gitignoresupport plus built-in exclusions for caches, dependencies, build output, and repo-map artifacts - Symlink-safe traversal that does not follow linked files or directories
- SHA-256-based SQLite cache for unchanged files
See examples/example.md for a full sample report.
Install
Install the published CLI with uv:
uv tool install repo-map
For development, clone the repository and install its Poetry environment:
git clone https://github.com/cyanheads/repo-map.git
cd repo-map
poetry install
repo-map requires Python 3.12 or newer.
Configure
Set an OpenRouter API key in the environment or a project-root .env file:
export OPENROUTER_API_KEY=your_api_key_here
Optional environment variables:
| Variable | Default | Purpose |
|---|---|---|
OPENROUTER_MODEL_NAME |
anthropic/claude-sonnet-4.6 |
OpenRouter model |
API_SEMAPHORE_LIMIT |
3 |
Maximum concurrent API calls |
repo-map sends repository paths, languages, imports, symbols, and existing descriptions to OpenRouter. Review the target repository and its ignore rules before approving a run. Do not analyze secrets or source you are not authorized to disclose.
Use
With the published tool installed:
repo-map /path/to/repository
From a source checkout:
poetry run repo-map /path/to/repository
Options:
| Option | Purpose |
|---|---|
-y, --yes |
Skip the disclosure confirmation |
--model MODEL |
Override OPENROUTER_MODEL_NAME |
--concurrency INT |
Override API_SEMAPHORE_LIMIT |
Examples:
poetry run repo-map /path/to/repository --model anthropic/claude-sonnet-4.6
poetry run repo-map /path/to/repository --concurrency 3 -y
Each run creates these files inside the target repository:
<repository>_repo_map.md: generated Markdown report.repo-map-cache.db: source hashes and cached LLM metadata.repo_map_structure.json: pre-enhancement structural data
Add them to the target repository's ignore rules if needed. Delete .repo-map-cache.db to force a complete reprocessing pass.
How it works
- Load built-in exclusions and the target repository's root
.gitignore. - Walk the directory tree and extract supported structural metadata.
- Compare file hashes with the SQLite cache.
- Request structured JSON metadata from OpenRouter for eligible changed files.
- Update the cache and write the console, JSON, and Markdown outputs.
Development
Run the local gate and build both distribution artifacts before submitting a change:
poetry run python scripts.py check
poetry build
Focused commands:
poetry run python scripts.py format
poetry run python scripts.py lint
poetry run python scripts.py test
poetry run python scripts.py list-skills
Project workflows live under skills/. Bugs and feature requests use the forms on the issues page.
License
Apache-2.0. See LICENSE.
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.8.2.tar.gz.
File metadata
- Download URL: repo_map-0.8.2.tar.gz
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.10 Darwin/25.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c31e80f3594d9005361954a9e1c50bec411508cd352d13f44487aeccdb4e7ee
|
|
| MD5 |
1a45fbd80a11476640ac929f841b5e98
|
|
| BLAKE2b-256 |
7e5e0ad00141115f9d259153a1a1143c0168c67efa819be101034553124468eb
|
File details
Details for the file repo_map-0.8.2-py3-none-any.whl.
File metadata
- Download URL: repo_map-0.8.2-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.10 Darwin/25.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad4a590023c05ee387af8ff5b02a2630aa61b5a262c389b68d93571dbc5a5734
|
|
| MD5 |
ae02f779f7ef89facf325b3ad77f50f2
|
|
| BLAKE2b-256 |
dc98d72a39eeba0abf553a4fb6ef84d440618c027c73022d930bb294f7cfe386
|