Metadata-Version: 2.3
Name: codemapper
Version: 4.8.0
Summary: A tool to generate comprehensive Markdown artifacts of directory structures and file contents
Keywords: codemapper,markdown,directory,file contents
Author: Shane Holloman
Author-email: Shane Holloman <shaneholloman@gmail.com>
License: MIT License
         
         Copyright (c) 2024 Shane Holloman
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: chardet
Requires-Dist: pathspec
Requires-Dist: ruff ; extra == 'dev'
Requires-Dist: ty ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Python: >=3.12
Project-URL: Homepage, https://github.com/shaneholloman/codemapper
Provides-Extra: dev
Description-Content-Type: text/markdown

# 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

```bash
uv tool install codemapper
```

## Basic Usage

```bash
# 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 map
- `project.docmap.md` - Documentation-only map (with --docs flag)

## Options

```bash
--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:

```toml
# 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
