Skip to content

About

Zip2LLMContext is a powerful web application that converts your project files into optimized context formats for Large Language Models (LLMs). Whether you're working with ZIP archives, GitHub repositories, or web content, this tool intelligently processes and formats your data for seamless AI integration.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

5 Commits

Folders and files

Repository files navigation

Zip2LLMContext Logo

Zip2LLMContext

Transform your projects into AI-ready context in seconds

Docker Next.js TypeScript

Screenshot 2025-12-17 at 9 56 59β€―PM image

DEMO (May take a while to load):

🎯 What is Zip2LLMContext?

Zip2LLMContext is a powerful web application that converts your project files into optimized context formats for Large Language Models (LLMs). Whether you're working with ZIP archives, GitHub repositories, or web content, this tool intelligently processes and formats your data for seamless AI integration.

✨ Key Features

  • πŸ“¦ Multiple Import Methods

    • Upload ZIP files directly
    • Import from GitHub repositories (with private repo support)
    • Scrape website content
  • πŸ€– AI Model Integration

    • Real-time pricing from 500+ models via OpenRouter API
    • Dynamic cost estimation based on token count
    • Context budget tracking for model limits
  • 🎨 Smart Processing

    • Automatic filtering of node_modules, binaries, and common excludes
    • File type recognition with visual icons
    • Intelligent content extraction and formatting
  • πŸ“„ Multiple Export Formats

    • Markdown (GPT, DeepSeek compatible)
    • XML (Claude, Anthropic compatible)
    • One-click copy to clipboard or download
  • πŸ’» Modern UI

    • Dark theme optimized for developers
    • Responsive design
    • Real-time statistics and progress tracking

πŸš€ Quick Start

Docker Deployment (Recommended)

The easiest way to run Zip2LLMContext is using Docker. No need to install dependencies or configure anything!

Prerequisites

Run with Docker Compose

# Clone the repository
git clone https://github.com/yourusername/zip2llmcontext.git
cd zip2llmcontext

# Start the application
docker compose up

# Or run in detached mode
docker compose up -d

The application will be available at http://localhost:5700

Build and Run Manually

# Build the Docker image
docker build -t zip2llmcontext .

# Run the container
docker run -p 5700:3000 zip2llmcontext

Stop the Application

# If running with docker compose
docker compose down

# If running manually
docker stop <container-id>

Local Development Setup

If you prefer to run the application locally without Docker:

Prerequisites

  • Node.js 18.x or higher
  • npm or yarn package manager

Installation

# Clone the repository
git clone https://github.com/yourusername/zip2llmcontext.git
cd zip2llmcontext

# Install dependencies
npm install

# Run the development server
npm run dev

The application will be available at http://localhost:3000

Build for Production

# Create an optimized production build
npm run build

# Start the production server
npm start

πŸ“– How to Use

1. Import Your Content

Option A: Upload ZIP File

  • Click the "Upload ZIP" tab
  • Drag and drop your project ZIP file or click to browse
  • The app automatically filters out unnecessary files

Option B: Import from GitHub

  • Click the "GitHub" tab
  • Enter the repository URL (e.g., owner/repo or full URL)
  • Optionally add a GitHub token for private repositories
  • Click "Import Repository"

Option C: Scrape Website

  • Click the "Website" tab
  • Enter the URL of the webpage
  • Click "Scrape Website" to extract clean text content

2. Review and Select Files

  • Browse the file explorer on the left side
  • Check/uncheck files you want to include
  • Use "Select All" or "Deselect All" for bulk actions
  • View file sizes and token estimates in real-time

3. Configure Settings

AI Model Selection

  • Search for your target AI model
  • View pricing information (input/output costs per 1M tokens)
  • See accurate cost estimates based on your content

Output Format

  • Choose between Markdown or XML format
  • Markdown: Best for GPT models, DeepSeek
  • XML: Optimized for Claude and Anthropic models

Context Budget

  • Monitor token usage vs. model limits
  • Color-coded status indicators (Safe/Warning/Critical)
  • Real-time usage percentage

4. Export Your Context

  • Click "Copy to Clipboard" for quick paste into AI chats
  • Click "Download Megafile" to save as a file
  • The output includes all selected files with proper formatting

πŸ› οΈ Technology Stack

  • Framework: Next.js 15 with React 19
  • Language: TypeScript
  • Styling: Tailwind CSS v4
  • UI Components: shadcn/ui
  • File Processing: JSZip
  • API Integration: OpenRouter
  • Containerization: Docker

πŸ“ Project Structure

zip2llmcontext/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/              # API routes for scraping and processing
β”‚   β”œβ”€β”€ layout.tsx        # Root layout with metadata
β”‚   β”œβ”€β”€ page.tsx          # Main application page
β”‚   └── globals.css       # Global styles and design tokens
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ drop-zone.tsx     # File upload interface
β”‚   β”œβ”€β”€ file-explorer.tsx # File tree and selection
β”‚   β”œβ”€β”€ github-import.tsx # GitHub repository importer
β”‚   β”œβ”€β”€ website-scraper.tsx # Web scraping interface
β”‚   β”œβ”€β”€ model-selector.tsx  # AI model selection
β”‚   β”œβ”€β”€ stats-panel.tsx     # Statistics and budget display
β”‚   └── export-panel.tsx    # Export controls
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ zip-processor.ts    # ZIP file processing logic
β”‚   β”œβ”€β”€ output-generator.tsx # Format generation
β”‚   └── file-icons.ts       # File type icon mapping
β”œβ”€β”€ public/
β”‚   └── logo.png           # Application logo
β”œβ”€β”€ Dockerfile             # Docker configuration
β”œβ”€β”€ compose.yaml           # Docker Compose setup
└── DOCKER.md             # Detailed Docker documentation

πŸ”’ Privacy & Security

  • 100% Client-Side Processing: All ZIP and GitHub file processing happens in your browser
  • No Data Storage: Files are never uploaded to external servers
  • Secure API Calls: Website scraping and model pricing use server-side routes to handle CORS
  • Optional GitHub Token: Only required for private repositories, stored locally in your session

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ‘¨β€πŸ’» Author

Made with ❀️ by Joshua Viars


πŸ› Troubleshooting

Docker Issues

Port already in use:

# Change the port in compose.yaml or use:
docker compose down

Build fails:

# Clear Docker cache and rebuild
docker compose build --no-cache

Local Development Issues

Module not found:

# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install

Port 3000 in use:

# Change the port
PORT=3001 npm run dev

For more detailed Docker troubleshooting, see DOCKER.md.


⭐ If you find this project useful, please consider giving it a star!

About

Zip2LLMContext is a powerful web application that converts your project files into optimized context formats for Large Language Models (LLMs). Whether you're working with ZIP archives, GitHub repositories, or web content, this tool intelligently processes and formats your data for seamless AI integration.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages