Metadata-Version: 2.4
Name: pakem
Version: 1.0.0
Summary: A repository packer that generates XML representations of codebases
Author: Yaron Koresh
License: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/YaronKoresh/pakem
Project-URL: Repository, https://github.com/YaronKoresh/pakem
Project-URL: Issues, https://github.com/YaronKoresh/pakem/issues
Keywords: repository,packer,xml,codebase
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=9.0.2; extra == "dev"
Requires-Dist: ruff>=0.15.1; extra == "dev"
Dynamic: license-file

# pakem

A repository packer that generates XML representations of codebases for use with LLMs and code analysis tools.

## Features

- Packs an entire repository into a single XML file
- Respects `.gitignore` patterns and common ignore rules
- Skips binary files automatically
- Includes file metadata (size, tokens, line count)
- Token counting for LLM context estimation

## Installation

```bash
pip install pakem
```

## Usage

### Command Line

```bash
# Pack the current directory
pakem

# Pack a specific directory
pakem --path /path/to/repo

# Specify output file
pakem --path /path/to/repo --out output.xml

# Add additional ignore patterns
pakem --ignore "*.tmp" "secret_*"
```

You can also run it as a module:

```bash
python -m pakem --path /path/to/repo --out output.xml
```

### Python API

```python
from pakem import RepoPacker

packer = RepoPacker(
    root_dir="/path/to/repo",
    output_file="repo.xml",
    ignores=["*.tmp"]
)
packer.pack()
```

## Development

### Setup

```bash
git clone https://github.com/YaronKoresh/pakem.git
cd pakem
pip install -e ".[dev]"
```

### Running Tests

```bash
pytest
```

### Linting

```bash
ruff check .
```

## License

This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.
