Skip to main content

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 projects
  • python - Python packages, Django, Flask projects
  • node - Node.js, npm packages
  • mobile - React Native, Flutter
  • docs - Documentation projects
  • minimal - Only essential text files
  • full - Include everything (use with caution)

Each preset automatically configures:

  • File type inclusions/exclusions
  • Folder exclusions
  • Size limits
  • Output formatting

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

llm_context_builder-1.0.0.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

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

llm_context_builder-1.0.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

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

Hashes for llm_context_builder-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a5ddf6cda23157a62991cf9fba170e24207586bddc5e4eeab578da12577a9e99
MD5 f4ac8dc1dac5064a77df32be7d890dfe
BLAKE2b-256 03041acac263296cbd734c3e77e32e92a402d4767206009f1cece252a7c73be1

See more details on using hashes here.

File details

Details for the file llm_context_builder-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_context_builder-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58bfc60d1418ee8b6b68cf28a69c8fd840bfa64f12291f02e957d71d768a6d13
MD5 7010f0b122f6df45e752f0653729b39b
BLAKE2b-256 c63f01610174d6fbd6ff117cbbd3fbec081b4ba54224cebd6d1f3abecccf1bfe

See more details on using hashes here.

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