CodeMapper
Converts codebases into single-file Markdown documents for language model context and code analysis.
What It Does
CodeMapper scans a directory or GitHub repository and generates a comprehensive Markdown file containing:
- Complete directory tree structure
- All file contents with syntax highlighting
- Git metadata (branch, commit, remote)
Files are filtered intelligently - binary files, lock files, cache directories, and files over 300k characters are excluded.
Installation
uv tool install codemapper
Basic Usage
# Generate codemap from local directory
codemapper /path/to/project
# Generate codemap from GitHub repository
codemapper https://github.com/user/repo
# Generate documentation map (README + docs/ only)
codemapper --docs /path/to/project
Output
By default, CodeMapper creates .codemaps/ in your current directory:
project.codemap.md- Full codebase mapproject.docmap.md- Documentation-only map (with --docs flag)
Options
--docs Generate documentation map instead of code map
--docs-dir DIR Specify custom documentation directory
--exclude DIR Exclude directory (can be used multiple times)
--output-dir DIR Custom output directory (overrides config)
--include-ignored Include files normally ignored by .gitignore
--version Show version
--help Show help
Configuration
Optional Configuration
Copy codemapper.example.toml to ~/.codemapper/codemapper.toml for optional configuration:
# Centralized collection: All codemaps go to one directory
output_dir = "~/.codemapper"
# OR custom prefix: Change directory name in current location
# prefix_style = "dot" # .codemaps/ (default)
# prefix_style = "underscore" # _codemaps/
# prefix_style = "dash" # -codemaps/
Precedence: CLI --output-dir > Config output_dir > Config prefix_style > Default (.codemaps/ in current directory)
Without config: Creates .codemaps/ where you run the command (project-level management)
With output_dir set: All codemaps go to one centralized location (system-level management)
What Gets Excluded
Always excluded:
.git/,.venv/,.conda/,node_modules/- Cache directories:
.ruff_cache/,.pytest_cache/,__pycache__/, etc. - System files:
.DS_Store,Thumbs.db - Lock files:
uv.lock,package-lock.json,yarn.lock, etc. - Archive files:
.zip,.tar,.gz, etc. - Binary files: images, videos, executables, etc.
- Files over 300k characters (too large for AI context)
Respects .gitignore unless --include-ignored flag is used.
Requirements
Python 3.12 or newer
License
MIT
Metadata
Release files for codemapper 4.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| codemapper-4.8.1.tar.gz | 14.9 kB | Without provenance | Details for codemapper-4.8.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| codemapper-4.8.1-py3-none-any.whl | Python 3 | none | any | Details for codemapper-4.8.1-py3-none-any.whl |
Total release size: 37.1 kB
Release files / codemapper-4.8.1.tar.gz
| Download URL | codemapper-4.8.1.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a5cc161bea21bf4080f230c4ce5a65db97ad9b7b78564536af8526a38a468dea
|
|
BLAKE2b-256 checksum How to use checksums |
1f8f6911a7a832f49a35d2c3732338e1b9f53f097cb8cb89e5d3a4803dff7488
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.23
|
Release files / codemapper-4.8.1-py3-none-any.whl
| Download URL | codemapper-4.8.1-py3-none-any.whl |
|---|---|
| Size | 22.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d930f9ce1938f7b9ea0ad9487740539dfcb3d9a2131546d3715f7a39fa82f94
|
|
BLAKE2b-256 checksum How to use checksums |
043b51551037908cd68e65c4302861dcbe5d4c7923593cc801e453160e4632e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.23
|
Security for codemapper 4.8.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.