Skip to content

Manan-49/file-combiner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ File Combiner v2

File Combiner v2 Demo

A lightweight, zero-dependency web application that lets you drag and drop a folder of code files, auto-exclude unwanted files (node_modules, .git, .next, .venv, etc.), select specific files, and combine them into a single markdown file with optional AI prompt templates. Built with pure HTML, CSS, and JavaScript β€” no frameworks, no build tools.

πŸ”— Live Demo: file-combiner.netlify.app


✨ Features

Core

  • Drag-and-Drop Upload β€” Drop a folder or click to browse
  • Smart Auto-Exclude β€” Automatically filters out node_modules, .git, .next, .venv, __pycache__, dist, build, lock files, binaries, images, and 70+ other patterns
  • Exclude Presets β€” Choose from None, Minimal, Standard, or Aggressive exclusion levels
  • Custom Exclude Patterns β€” Add/remove your own patterns (supports wildcards like *.log)
  • Max File Size Filter β€” Skip files larger than a configurable limit (50KB–10MB)
  • File Selection β€” Select all, none, code files only, or filter by type (components, styles, config)
  • Search β€” Real-time search bar to find files instantly

Output

  • Markdown Generation β€” Combine files into markdown with optional fenced code blocks and language-specific syntax highlighting
  • Folder Tree View β€” Optionally include a visual folder structure in the output
  • Minification β€” Strip comments and whitespace from code output
  • AI Prompt Templates β€” 10 pre-built prompts (debug, refactor, explain, optimize, review, test, document, security, architecture, convert)
  • Custom Prompts β€” Add your own prompt or project context template
  • Copy to Clipboard β€” One-click copy using modern Clipboard API
  • Download β€” Export as .md or .txt

Intelligence

  • Token Counter β€” Estimates token count for AI model compatibility
  • Token Limit Selector β€” Presets for GPT-3.5 (4K/16K), GPT-4 (8K), GPT-4 Turbo (128K), Claude 3.5 (200K), Gemini 1.5 (1M)
  • Token Progress Bar β€” Visual indicator with safe/warning/danger states
  • Language Breakdown β€” Bar chart showing file type distribution across your project

UI/UX

  • Dark/Light Theme β€” Toggle with persistent preference
  • File Preview β€” Click the πŸ‘οΈ icon to preview any file before combining
  • Toast Notifications β€” Non-intrusive feedback for all actions
  • Responsive Design β€” Mobile-first layout that works on all screen sizes
  • Accessibility β€” ARIA attributes and keyboard navigation
  • Persistent Settings β€” Theme, exclude patterns, and max size saved to localStorage
  • Zero Dependencies β€” Pure HTML/CSS/JS, no frameworks or build tools

Excluded File Info

  • Transparency β€” See exactly which files were excluded and why
  • Expandable Details β€” Collapsible list showing excluded file paths and reasons

πŸ“Š Auto-Exclude Patterns (Standard Preset)

Category Patterns
Package Managers node_modules, package-lock.json, yarn.lock, pnpm-lock.yaml
Build Output dist, build, out, .next, .nuxt, .svelte-kit, .output
Version Control .git
Python .venv, venv, __pycache__, *.pyc
Cache .cache, .turbo
System .DS_Store, Thumbs.db
Logs *.log, *.lock
Test Coverage coverage, .nyc_output
Environment .env, .env.local

The Aggressive preset adds 70+ more patterns including images, fonts, binaries, IDE folders, and compiled files.


πŸ› οΈ Tech Stack

Technology Purpose
HTML5 Semantic structure with ARIA accessibility
CSS3 CSS variables, dark mode, responsive design, custom animations
JavaScript (ES6+) File processing, UI interactions, markdown generation
Netlify Static site hosting with continuous deployment

Zero external dependencies β€” no React, no Tailwind, no GSAP, no build step.


πŸš€ Getting Started

Prerequisites

  • A modern web browser (Chrome, Firefox, Edge, Safari)
  • Git for version control
  • A Netlify account for deployment (optional)

Installation

git clone https://github.com/Manan-49/file-combiner.git
cd file-combiner

Run Locally

Just open index.html in your browser, or use a local server:

# Using Python
python -m http.server 8000

# Using Node.js
npx serve .

# Using VS Code
# Install "Live Server" extension and click "Go Live"

Deploy to Netlify

  1. Push to GitHub
  2. Connect the repository on Netlify
  3. Set publish directory to . (root)
  4. Deploy β€” no build command needed

πŸ“ Project Structure

file-combiner/
β”œβ”€β”€ index.html          # Main HTML structure
β”œβ”€β”€ script.js           # All application logic
β”œβ”€β”€ styles.css          # Styles with CSS variables & dark mode
β”œβ”€β”€ netlify.toml        # Netlify deployment config
└── README.md           # This file

πŸ“ Usage

  1. Drop a folder onto the drop zone (or click to browse)
  2. Configure exclusions β€” Choose a preset or add custom patterns
  3. Select files β€” Use Select All, Code Files, or pick individually
  4. Search & filter β€” Find specific files by name or type
  5. Preview β€” Click πŸ‘οΈ to view file contents before combining
  6. Set options β€” Toggle code blocks, folder tree, minification
  7. Combine β€” Click "πŸ”— Combine Files" to generate output
  8. Add AI context β€” Apply a prompt template or project context
  9. Check tokens β€” Select your AI model and verify token count
  10. Export β€” Copy to clipboard or download as .md / .txt

πŸ”„ Changelog

v2.0.0 (Latest)

  • βœ… Auto-exclude patterns (70+ for node_modules, .git, .next, .venv, etc.)
  • βœ… Configurable exclude UI with presets (None/Minimal/Standard/Aggressive)
  • βœ… Custom exclude patterns with wildcard support
  • βœ… Max file size filter
  • βœ… Excluded files transparency panel
  • βœ… Real-time file search
  • βœ… Dark/Light theme toggle
  • βœ… File preview modal
  • βœ… Language breakdown chart
  • βœ… Token limit selector (GPT-3.5/4/Claude/Gemini)
  • βœ… Token progress bar with warnings
  • βœ… Folder tree view in output
  • βœ… Download as .txt
  • βœ… Toast notifications
  • βœ… localStorage persistence
  • βœ… Modern Clipboard API
  • βœ… Removed GSAP dependency (zero dependencies)
  • βœ… Bug fixes (event handling, proper reset, accessibility)

v1.0.0

  • Initial release with drag-and-drop, file selection, code blocks, and AI prompts

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit changes: git commit -m "Add my feature"
  4. Push to branch: git push origin feature/my-feature
  5. Open a Pull Request

πŸ“„ License

This project is open source and available under the MIT License.


πŸ‘€ Author

Manan β€” GitHub

About

A zero-dependency web app to drag and drop code folders, auto-exclude unwanted files (node_modules, .git, .next, .venv, etc.), and combine selected files into markdown with AI prompt templates, token counting, dark mode, and file preview. Built with pure HTML, CSS, and JavaScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors