├── CNAME ├── LICENSE ├── README.md ├── index.html └── script.js /CNAME: -------------------------------------------------------------------------------- 1 | dropnread.io -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Project Flattener 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Project Flattener 2 | 3 | A web-based tool that helps prepare source code for Large Language Models (LLMs) by combining multiple files into a single text file. Perfect for when you need to share your codebase with AI models like GPT-4, Claude, or Gemini. 4 | 5 | ## Features 6 | 7 | - 🗂️ Drag & drop folder support 8 | - 📏 Token limit awareness for various LLMs 9 | - 🧹 Comment stripping for common programming languages 10 | - ⚙️ Configurable file/folder exclusion patterns 11 | - 📊 Real-time token counting 12 | - 💾 Binary file handling options 13 | 14 | ## Supported Models 15 | 16 | - GPT-4 (128K tokens) 17 | - Claude 2 (100K tokens) 18 | - Gemini Experimental 1206 (2M tokens) 19 | - Gemini 1.5 Pro (1M tokens) 20 | 21 | ## Usage 22 | 23 | 1. Open `index.html` in a modern browser (Chrome/Edge recommended) 24 | 2. Select your target LLM model 25 | 3. Configure options: 26 | - Strip comments to reduce token usage 27 | - Include/exclude binary files 28 | - Adjust file exclusion patterns 29 | 4. Drag a folder or use the "Select Directory" button 30 | 5. Copy the processed output to clipboard 31 | 32 | ## Comment Stripping Support 33 | 34 | Supports comment removal for: 35 | - JavaScript/TypeScript 36 | - Python 37 | - PHP 38 | - Java 39 | - C/C++ 40 | - Ruby 41 | - Go 42 | - Rust 43 | - Shell scripts 44 | - And more... 45 | 46 | ## Default Exclusions 47 | 48 | Comes with sensible defaults for excluding: 49 | - Version control directories (.git, .svn) 50 | - Dependencies (node_modules, vendor) 51 | - Build outputs (dist, build) 52 | - IDE files (.idea, .vscode) 53 | - Compiled files (*.exe, *.pyc) 54 | - And many more... 55 | 56 | ## Browser Support 57 | 58 | - Chrome/Chromium (recommended) 59 | - Edge 60 | - Other modern browsers with File System Access API support 61 | 62 | ## Local Development 63 | 64 | 1. Clone the repository 65 | 2. Open `index.html` in your browser 66 | 3. No build process or dependencies required 67 | 68 | ## License 69 | 70 | MIT License - See LICENSE file for details -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |54 | This tool helps prepare source code for Large Language Models (LLMs) by combining multiple files into a single text. 55 | Drop a folder or click Select Directory to start. 56 |
57 |• Model Selection: Choose your target LLM to ensure the output fits within its token limit
59 |• Strip Comments: Remove code comments to reduce token usage
60 |• Include Binary Files: List binary files in the output (without their contents)
61 |• Filters: Exclude files/folders that match specific patterns
62 |Removes comments from common programming languages to reduce token count
107 |Lists binary files with their paths (no content)
114 |{path}
- File path
189 | {filename}
- File name
191 | {content}
- File content
193 | {newline}
- New line character
195 |