Enhanced tool to concatenate folder contents into markdown format for LLM consumption
Project description
folder2md4llms
folder2md4llms is a powerful and flexible tool that converts a repository's contents into a single, LLM-friendly Markdown file. It's designed to be fast, configurable, and easy to use, with a focus on producing high-quality, structured output.
✨ 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. - Fast and Efficient: Leverages multi-threading and efficient file processing to handle large repositories quickly.
- Advanced Filtering: Uses
.gitignore-style patterns to exclude files and directories.
🚀 Quick Start
Installation
# Using uv (recommended)
uv add folder2md4llms
# Using pip
pip install folder2md4llms
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
For a full list of commands and options, see the CLI Reference or run folder2md --help.
🔧 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 Configuration Guide.
🛠️ 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
make setup
# See all available commands
make help
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For more information, see the Contributing Guidelines.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
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 folder2md4llms-0.4.28.tar.gz.
File metadata
- Download URL: folder2md4llms-0.4.28.tar.gz
- Upload date:
- Size: 101.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77010763c38b48904a330dbd46eefd0d287e0a058c5000ac04ae81b1ba8e2ed8
|
|
| MD5 |
a9f15344577698c90d4b778c022a4ad2
|
|
| BLAKE2b-256 |
1f0e6746e2dde1c8fbc74f54b4170e1b1cfd01940ad280a98eef51e73f3882ef
|
File details
Details for the file folder2md4llms-0.4.28-py3-none-any.whl.
File metadata
- Download URL: folder2md4llms-0.4.28-py3-none-any.whl
- Upload date:
- Size: 98.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b69ae0f30216f4991db78752c94d38912ee7abb98bf7df8f4a2c326aa7bc06a
|
|
| MD5 |
bcacbbae5528951bb7dabaa7a955acaf
|
|
| BLAKE2b-256 |
0c3f2f2ff4a7baf0cf5d707f02b07da3f91aa9e9a6c987498823fd453f0229a6
|