Metadata-Version: 2.4
Name: repo-to-llm
Version: 0.1.2
Summary: CLI tool to convert a code repository into LLM-friendly markdown
Author-email: Luca Bottero <lucabottero99@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Luca Bottero
        
        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.
        
Project-URL: Homepage, https://github.com/luca-bottero/repo-to-llm
Project-URL: Repository, https://github.com/luca-bottero/repo-to-llm
Project-URL: Bug Tracker, https://github.com/luca-bottero/repo-to-llm/issues
Keywords: cli,llm,markdown,codebase,repo,repository
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: gitignore-parser
Dynamic: license-file

# repo-to-llm

**Convert a code repository into a clean, LLM-friendly Markdown report.**  
Includes a directory tree and source code contents, with filtering for size, binary files, and `.gitignore`.

## Features

- ✅ CLI interface
- ✅ `.gitignore` and glob-based exclusions
- ✅ File size filtering
- ✅ Language-aware syntax blocks (e.g. `python`, `yaml`, etc.)
- ✅ Directory tree generation (optional)

## Installation

```bash
pip install repo-to-llm
````

## Usage

```bash
repo-to-llm /path/to/repo > output.md
```

### Options

```bash
--output OUTPUT           Write to a file instead of stdout
--print                   Print to stdout (default)
--max-bytes 300kb         Max file size to include (default: 500000 bytes)
--exclude-tree            Skip the directory tree section
--exclude-patterns "*.log" "docs/*"   Glob patterns to exclude
--verbose                 Enable debug output
```

### Example

```bash
repo-to-llm my-project --exclude-patterns "*.log" "tests/*" --max-bytes 300kb > project.md
```

## Configuration

You can override defaults in `~/.repo_to_llm/config.yml`.

```yaml
max_bytes: 1000000
excluded_patterns:
  - ".git/*"
  - "__pycache__/*"
extension_mapping:
  .ext: my_extension
  .ext2: my_second_extension
```

## Contributing

Contributions are welcome. Please open an issue or PR on GitHub.

## License

MIT License. See [LICENSE](./LICENSE).
