Export any project to a single text file optimized for LLM context
Project description
LLM Context Builder - Pip Package Structure
Package Structure
llm-context-builder/
├── setup.py
├── pyproject.toml
├── README.md
├── llm_context_builder/
│ ├── __init__.py
│ ├── main.py
│ ├── project_detector.py
│ └── exporters/
│ ├── __init__.py
│ └── base_exporter.py
└── requirements.txt
Installation & Usage
Installation
pip install llm-context-builder
Usage
# Export current directory
export_project
# Export specific directory
export_project /path/to/project
# Custom output location
export_project -o /custom/path/output.txt
# Quick web project export (auto-detects React/Vue/etc.)
export_project --preset web
# Quick Python project export
export_project --preset python
# Show token count estimate
export_project --count-tokens
# List available presets
export_project --list-presets
Features
🎯 Smart Project Detection
- Automatically detects project type (Python, Node.js, React, Vue, etc.)
- Applies appropriate exclusions for each project type
- Suggests optimal presets
🧠 LLM-Optimized Output
- Clean, readable format perfect for LLM context
- Token counting to estimate context usage
- Optimized file headers for better parsing
- Smart content truncation for large files
⚡ Zero Configuration
- Works out of the box in any directory
- Sensible defaults for common project types
- Creates
project_export/in current directory
🎛 Highly Configurable
- Custom exclusion patterns
- Project-specific presets
- Flexible output options
- Override any default behavior
Example Outputs
Command:
cd ~/my-react-app
export_project
Result:
✅ Detected: React project
📁 Output: ./project_export/react_app_20250602_143052.txt
📊 Files processed: 45
🔤 Estimated tokens: ~12,500
⏱ Completed in 0.3s
Command:
export_project --preset python --count-tokens
Result:
🐍 Using Python preset
📁 Output: ./project_export/python_project_20250602_143105.txt
📊 Files: 23 processed, 156 skipped
🔤 Tokens: 8,342 (fits in GPT-4 context)
📋 Included: .py, .md, .txt, .yml, .toml
🚫 Excluded: __pycache__, .git, venv, *.pyc
Project Presets
Available Presets:
web- React, Vue, Angular, general web projectspython- Python packages, Django, Flask projectsnode- Node.js, npm packagesmobile- React Native, Flutterdocs- Documentation projectsminimal- Only essential text filesfull- Include everything (use with caution)
Each preset automatically configures:
- File type inclusions/exclusions
- Folder exclusions
- Size limits
- Output formatting
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
llm_context_builder-1.0.0.tar.gz
(13.9 kB
view details)
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 llm_context_builder-1.0.0.tar.gz.
File metadata
- Download URL: llm_context_builder-1.0.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5ddf6cda23157a62991cf9fba170e24207586bddc5e4eeab578da12577a9e99
|
|
| MD5 |
f4ac8dc1dac5064a77df32be7d890dfe
|
|
| BLAKE2b-256 |
03041acac263296cbd734c3e77e32e92a402d4767206009f1cece252a7c73be1
|
File details
Details for the file llm_context_builder-1.0.0-py3-none-any.whl.
File metadata
- Download URL: llm_context_builder-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58bfc60d1418ee8b6b68cf28a69c8fd840bfa64f12291f02e957d71d768a6d13
|
|
| MD5 |
7010f0b122f6df45e752f0653729b39b
|
|
| BLAKE2b-256 |
c63f01610174d6fbd6ff117cbbd3fbec081b4ba54224cebd6d1f3abecccf1bfe
|