Skip to main content

Pack a folder into a single LLM-friendly context file

Project description

foldermix

Pack a folder into a single LLM-friendly context file.

CI

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

foldermix-0.1.6.tar.gz (100.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

foldermix-0.1.6-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file foldermix-0.1.6.tar.gz.

File metadata

  • Download URL: foldermix-0.1.6.tar.gz
  • Upload date:
  • Size: 100.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for foldermix-0.1.6.tar.gz
Algorithm Hash digest
SHA256 6bc9f1d0fe00a3127f4fe861246d648ed12ee0233f11ed0dd5f47d0a66e7bf01
MD5 5753f322a8d57a10fe93c2d1f502b2b0
BLAKE2b-256 e532585e8bc59d7304fd6b4d902ee2f7d9b2ffc1c65e839f5438bfe768e18b0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for foldermix-0.1.6.tar.gz:

Publisher: ci.yml on shaypal5/foldermix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foldermix-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: foldermix-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for foldermix-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 343749715145b5373350ca987143c2680ce39870eb229e067c6f7f7efe12a4f8
MD5 30bd129fbdd4b1c1d44a54a01ae294cb
BLAKE2b-256 a42d7c1537d435001fc42af9302af15dad8b03848d3bc087332b58851ddb3cf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for foldermix-0.1.6-py3-none-any.whl:

Publisher: ci.yml on shaypal5/foldermix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page