folder2md4llms
folder2md4llms is a configurable tool that converts any folder structure and its contents into a single, LLM-friendly Markdown file. It supports various file formats and provides options for content condensing and filtering.
✨ Key Features
- Smart Condensing: Automatically condenses code to fit within a specified token or character limit without crude truncation.
- Document Conversion: Converts PDF, DOCX, XLSX, and other document formats into text.
- Binary File Analysis: Provides intelligent descriptions for images, archives, and other binary files.
- Highly Configurable: Use a
folder2md.yamlfile or command-line options to customize the output. - Parallel Processing: Uses multi-threading for processing multiple files concurrently.
- Advanced Filtering: Uses
.gitignore-style patterns to exclude files and directories.
🚀 Installation
Requires Python 3.11+
macOS (Homebrew) - Recommended for Mac users
brew install henriqueslab/formulas/folder2md4llms
Updating:
brew update
brew upgrade folder2md4llms
Benefits: Simple one-command installation, automatic dependency management (Python 3.13, libmagic), easy updates
Note: Package name is folder2md4llms, but the command is folder2md.
All Platforms (pipx)
# Using pipx (recommended)
pipx install folder2md4llms
# Or using pip
pip install folder2md4llms
Package name is
folder2md4llms, command isfolder2md
Basic Usage
# Process the current directory and save to output.md
folder2md .
# Process a specific directory and set a token limit
folder2md /path/to/repo --limit 80000t
# Copy the output to the clipboard
folder2md /path/to/repo --clipboard
# Generate a .folder2md_ignore file
folder2md --init-ignore
# Upgrade to the latest version
folder2md --upgrade
# Check for available updates
folder2md --upgrade-check
For a full list of commands and options, see the CLI Reference or run folder2md --help.
🚨 Troubleshooting
Command not found?
- Ensure pipx is installed:
pip install pipx - Or use:
python -m folder2md4llms .
Need Help?
- Run
folder2md --helpfor command reference - Check GitHub Issues
- Join GitHub Discussions
🔧 Configuration
You can configure folder2md4llms by creating a folder2md.yaml file in your repository's root directory. This allows you to set advanced options and define custom behavior.
For more details, see the CLI Reference.
🛠️ Development
Interested in contributing? Get started with these simple steps:
# Clone the repository
git clone https://github.com/henriqueslab/folder2md4llms.git
cd folder2md4llms
# Set up the development environment
just setup
# See all available commands
just --list
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For more information, see the Contributing Guidelines.
📖 Documentation
- Documentation site - Installation, usage, configuration, and CLI reference
- CLI Reference - Command-line reference (in-repo)
- Contributing Guidelines - How to contribute to the project
- Changelog - Version history and changes
📦 Distribution Channels
- PyPI: folder2md4llms - Python package
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for folder2md4llms 0.5.18
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 |
|---|---|---|---|---|
| folder2md4llms-0.5.18.tar.gz | 774.9 kB | With provenance | Details for folder2md4llms-0.5.18.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| folder2md4llms-0.5.18-py3-none-any.whl | Python 3 | none | any | Details for folder2md4llms-0.5.18-py3-none-any.whl |
Total release size: 907.8 kB
Release files / folder2md4llms-0.5.18.tar.gz
| Download URL | folder2md4llms-0.5.18.tar.gz |
|---|---|
| Size | 774.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5e99219b4bf56b957389208b7ef3def0fcff8eb3e60eaffaa17f4ee044ecc01
|
|
BLAKE2b-256 checksum How to use checksums |
eba145c7464701672a9b836433f73a46f99a84b397691c9abdb51e038ce3c972
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.
Transparency logRelease files / folder2md4llms-0.5.18-py3-none-any.whl
| Download URL | folder2md4llms-0.5.18-py3-none-any.whl |
|---|---|
| Size | 132.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ddd0116d669f2047cce3d80f5ef92864a675f19aff9129407fe8ad4749754e5
|
|
BLAKE2b-256 checksum How to use checksums |
dbebad0ca52ac5135498545ce49822e33aec17a6b88b524d7da88e7e6521fa7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.
Transparency logSecurity for folder2md4llms 0.5.18
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for folder2md4llms-0.5.18.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.
Transparency logA 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.