promcat
A command-line tool for concatenating text files in a directory tree, designed for creating context files for LLM prompting.
Features
- Recursively finds and concatenates all text files in a directory
- Respects
.gitignorepatterns (optional) - Multiple header styles for file sections
- Line numbering support
- Customizable path display (relative/absolute)
- Various output formatting options
Installation
Using uv:
uv venv
source .venv/bin/activate # or Windows equivalent
uv pip install -e .
Usage
Basic usage:
promcat # Process current directory, output to stdout
promcat /path/to/project # Process specific directory
promcat -o output.txt # Save to file instead of stdout
Options
--output, -o Output file path (defaults to stdout)
--respect-gitignore Honor .gitignore patterns
--relative/--absolute Use relative or absolute paths in headers
--style Header style (newline|separator|markdown|xml)
--footer Include footers for file sections
--line-numbers Add line numbers to output
--separator Custom separator for line numbers (default: '|')
Header Styles
- Newline (
--style newline):
content of file 1
content of file 2
- Separator (
--style separator):
=== file1.txt ===
content of file 1
=== end file1.txt ===
- Markdown (
--style markdown):
## file1.txt
content of file 1
## end file1.txt
# script.py
content of script
# end script.py
- XML (
--style xml):
<file><path>file1.txt</path><content>content of file 1</content></file>
Line Numbers
Add line numbers with custom separator:
promcat --line-numbers --separator ' > '
Output:
=== file1.txt ===
1 > First line
2 > Second line
Use Cases
- Creating context files for LLM prompting
- Combining multiple source files for analysis
- Creating documentation from source files
- Code review and auditing
- Creating backups of text content
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License
Metadata
Release files for promcat 0.1.3
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 |
|---|---|---|---|---|
| promcat-0.1.3.tar.gz | 8.5 kB | Without provenance | Details for promcat-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| promcat-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for promcat-0.1.3-py3-none-any.whl |
Total release size: 14.4 kB
Release files / promcat-0.1.3.tar.gz
| Download URL | promcat-0.1.3.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6066fbc36f1650520f8524554a017de47cddc33d4a5eb1e5e42fcb5cfe83a7a8
|
|
BLAKE2b-256 checksum How to use checksums |
eecf3f9c4d2a0ac135f01f2348b009aef185c1e9994a6991a61feee1e3917b12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.14
|
Release files / promcat-0.1.3-py3-none-any.whl
| Download URL | promcat-0.1.3-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
717f82f3a5386ffe3564914f073148a312e5ef5ddfd79ccbe41c26ff3c2d3a44
|
|
BLAKE2b-256 checksum How to use checksums |
928183ef6920bbc2c12ab775d561ff861389272f0df790a82e5a6cfbd82ea34b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.14
|
Security for promcat 0.1.3
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.