Pack a folder into a single LLM-friendly context file
Project description
foldermix
Pack a folder into a single LLM-friendly context file.
Installation
pip install foldermix
# With optional extras:
pip install "foldermix[all]" # adds PDF, Office, tqdm
pip install "foldermix[pdf]" # pypdf only
pip install "foldermix[office]" # docx/xlsx/pptx support
Homebrew (macOS/Linux)
brew tap shaypal5/tap
brew install foldermix
Quick Start
# Pack current directory to markdown
foldermix pack .
# Pack to XML format
foldermix pack . --format xml
# Pack to JSONL format
foldermix pack . --format jsonl --out context.jsonl
# Dry run - list files without packing
foldermix pack . --dry-run
# List files that would be included
foldermix list .
# Show statistics
foldermix stats .
# Show version
foldermix version
Features
- Multiple output formats: Markdown, XML, JSONL
- Smart filtering: gitignore support, extension filters, glob patterns
- Sensitive file protection: Automatically skips
.env, keys, certificates - Optional converters: PDF (pypdf), Office docs (python-docx, openpyxl, python-pptx), markitdown
- Redaction: Email and phone number redaction via
--redact - SHA-256 checksums per file
- Parallel processing with configurable workers
- Table of contents in Markdown output
Options
foldermix pack [OPTIONS] [PATH]
Options:
-o, --out PATH Output file path
-f, --format TEXT Output format: md, xml, jsonl [default: md]
--include-ext TEXT Comma-separated extensions to include
--exclude-ext TEXT Comma-separated extensions to exclude
--exclude-dirs TEXT Comma-separated directory names to exclude
--exclude-glob TEXT Glob patterns to exclude
--include-glob TEXT Glob patterns to include
--max-bytes INTEGER Max bytes per file [default: 10000000]
--max-total-bytes INTEGER Max total bytes
--max-files INTEGER Max number of files
--hidden Include hidden files
--follow-symlinks Follow symbolic links
--respect-gitignore / --no-respect-gitignore [default: respect]
--workers INTEGER Number of worker threads [default: 4]
--progress Show progress bar (requires tqdm)
--dry-run List files without packing
--report PATH Write JSON report to path
--continue-on-error Skip files that fail to convert
--on-oversize TEXT skip or truncate [default: skip]
--redact TEXT none, emails, phones, all [default: none]
--strip-frontmatter Strip YAML frontmatter from files
--include-sha256 / --no-include-sha256 [default: include]
--include-toc / --no-include-toc [default: include]
Security
See SECURITY.md for details on sensitive file handling.
Contributing
See CONTRIBUTING.md.
License
See LICENSE.
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 foldermix-0.1.2.tar.gz.
File metadata
- Download URL: foldermix-0.1.2.tar.gz
- Upload date:
- Size: 99.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae1e0b0d81b30514ec4a09484187124d32d03707ecfcce03e356a6cfc399c6bf
|
|
| MD5 |
d802754637fdf9ee795454968cfac391
|
|
| BLAKE2b-256 |
5228fe8160a95d2fba26aafc795394842585608f9a6c60a32b532fccf59b334d
|
Provenance
The following attestation bundles were made for foldermix-0.1.2.tar.gz:
Publisher:
ci.yml on shaypal5/foldermix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
foldermix-0.1.2.tar.gz -
Subject digest:
ae1e0b0d81b30514ec4a09484187124d32d03707ecfcce03e356a6cfc399c6bf - Sigstore transparency entry: 976544200
- Sigstore integration time:
-
Permalink:
shaypal5/foldermix@fc3aefe3578116865b6e36a518de2c92c498d7e5 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/shaypal5
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@fc3aefe3578116865b6e36a518de2c92c498d7e5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file foldermix-0.1.2-py3-none-any.whl.
File metadata
- Download URL: foldermix-0.1.2-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34d48c9fb49af71ec052b66666fb5477158560357b24c5f8e811cc0c97c7fd81
|
|
| MD5 |
fa26693a3ffcc3d8fb750009d53faa05
|
|
| BLAKE2b-256 |
4a4d567a00434d1b438adcc03c431ca07266d5104cf1e6b6bb0ae1b1c5c8d4f9
|
Provenance
The following attestation bundles were made for foldermix-0.1.2-py3-none-any.whl:
Publisher:
ci.yml on shaypal5/foldermix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
foldermix-0.1.2-py3-none-any.whl -
Subject digest:
34d48c9fb49af71ec052b66666fb5477158560357b24c5f8e811cc0c97c7fd81 - Sigstore transparency entry: 976544207
- Sigstore integration time:
-
Permalink:
shaypal5/foldermix@fc3aefe3578116865b6e36a518de2c92c498d7e5 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/shaypal5
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@fc3aefe3578116865b6e36a518de2c92c498d7e5 -
Trigger Event:
push
-
Statement type: