Pack your codebase into a single file for AI analysis
Reason this release was yanked:
bugs
Project description
PilePack
Pack your codebase into a single file for AI analysis
Combine all your project files into one text file — perfect for sending to LLMs (ChatGPT, Claude, Copilot, Deepseek, etc.).
✨ Features
- 📁 Recursive scanning – walks through all files in a directory.
- 💾 Streaming output – minimal memory usage even on huge codebases.
- 🚫 Respects .gitignore – optionally disable with
--no-gitignore. - 🔗 Skips symlinks by default – opt in with
--follow-symlinks. - 🌳 Tree structure – displays project hierarchy.
- 📄 Embedded content – each file is shown with its path header.
- 🔐 Secrets masking – hides passwords, tokens, keys (
--mask-secrets). - 🖨️ Two output formats – plain text (
txt) or Markdown (md). - 💾 Save to file – use
-o output.txt.
📦 Installation
pip install pilepack
From source:
git clone https://github.com/dartmew/pilepack.git
cd pilepack
pip install -e .
🚀 Usage
Basic command – pass a path to your project:
pilepack /path/to/your/project
Redirect output to a file:
pilepack . > report.txt
Example output (txt)
myproject
├── main.py
├── utils/
│ ├── helpers.py
│ └── __init__.py
└── README.md
================================================================================
--- FILE: main.py ---
import utils.helpers
def main():
print("Hello")
--- FILE: utils/helpers.py ---
def greet(name):
return f"Hi {name}"
Markdown format
pilepack . -f md -o report.md
Produces a Markdown file with syntax highlighting.
Show only structure (no file contents)
pilepack . --no-content
Mask secrets
pilepack . --mask-secrets
Replaces values of password=, api_key=, token=, and long strings (base64/hex) with ***.
Disable .gitignore
pilepack . --no-gitignore
Follow symbolic links explicitly
pilepack . --follow-symlinks
📋 CLI Options
| Option | Description |
|---|---|
root |
Directory to scan (default: current directory) |
--no-content |
Show tree structure only, skip file contents |
--mask-secrets |
Mask passwords, tokens, API keys |
-o, --output |
Write report to a file instead of stdout |
--no-gitignore |
Do not respect .gitignore (include all files) |
--follow-symlinks |
Follow symbolic links during scanning |
-f, --format |
Output format: txt (default) or md |
🧪 Testing
Install test dependencies and run:
pip install -e .[test]
pytest
With coverage:
pytest --cov=pilepack
Current coverage: 84% (20 tests, all passing).
Name Stmts Miss Cover
-------------------------------------------
pilepack\__init__.py 0 0 100%
pilepack\__main__.py 3 3 0%
pilepack\cli.py 53 5 91%
pilepack\collector.py 32 2 94%
pilepack\formatter.py 39 2 95%
pilepack\ignorer.py 21 3 86%
pilepack\reader.py 31 12 61%
-------------------------------------------
TOTAL 179 27 85%
📄 License
MIT © 2026 Vasili S. Pribylov
🤝 Contributing
Issues and pull requests are welcome! For major changes, please open an issue first to discuss.
💬 Support
Feel free to open an issue for bugs, questions, or suggestions. I'll try to respond within a few days.
This project is actively maintained (as of 2026).
🙏 Acknowledgements
Inspired by the need to easily feed code into large language models.
Project details
Release history Release notifications | RSS feed
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 pilepack-0.2.0.tar.gz.
File metadata
- Download URL: pilepack-0.2.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5a387c9cbe898b1b6b2ce6f7b2212ac9642a227972c52e0eefe3e695d5358fd
|
|
| MD5 |
b0e5099963dfd7bd875dd6f577b73adb
|
|
| BLAKE2b-256 |
75dd1695dfbbb67b08349116ca3e3fb723e3b65edea122b6f409d0f510a309f6
|
Provenance
The following attestation bundles were made for pilepack-0.2.0.tar.gz:
Publisher:
publish.yml on dartmew/pilepack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pilepack-0.2.0.tar.gz -
Subject digest:
b5a387c9cbe898b1b6b2ce6f7b2212ac9642a227972c52e0eefe3e695d5358fd - Sigstore transparency entry: 1815166609
- Sigstore integration time:
-
Permalink:
dartmew/pilepack@0ee04712ff6d19d7f1e6f52298d36f4bfc4735a4 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dartmew
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0ee04712ff6d19d7f1e6f52298d36f4bfc4735a4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pilepack-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pilepack-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
518a88c719b2a2fb84fffbe4a9f707cb461b16a72233f67c0c6b12ceb69a4b17
|
|
| MD5 |
e3e7b41813abdbbcdad557a73924b104
|
|
| BLAKE2b-256 |
af82497d20926349cee8b7fa1641cf93de76021d9f134ba05d3605a7622d9a8a
|
Provenance
The following attestation bundles were made for pilepack-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on dartmew/pilepack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pilepack-0.2.0-py3-none-any.whl -
Subject digest:
518a88c719b2a2fb84fffbe4a9f707cb461b16a72233f67c0c6b12ceb69a4b17 - Sigstore transparency entry: 1815166865
- Sigstore integration time:
-
Permalink:
dartmew/pilepack@0ee04712ff6d19d7f1e6f52298d36f4bfc4735a4 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dartmew
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0ee04712ff6d19d7f1e6f52298d36f4bfc4735a4 -
Trigger Event:
release
-
Statement type: