A modern, high-performance tool designed to gather code context from complex projects for use with LLMs (Large Language Models). Built with Node.js and a sleek web-based frontend, it solves the limitations of native OS folder pickers by providing an Interactive Visual File Tree.
- Interactive File Tree: Select your project root and visually navigate your files. Check/uncheck folders to include or exclude entire sub-directories instantly.
- Smart Extension Detection: One-click "Auto-Detect" scans your project and pre-selects code-related extensions (
.py,.js,.kt,.ts, etc.) while ignoring binaries and logs. - Project Profiles: Save and load configurations for different projects. Remembers your root path, extension filters, and specific file selections.
- Visual Structure Generation: Automatically generates a professional ASCII tree representation of your project in
structure.txt. - Token-Aware Aggregation: Uses
tiktokenfor accurate token counting. Automatically splits context into multiple parts if they exceed your specified token limit. - Standalone Executable: Package the entire app into a single
.exefor Windows. Zero dependencies for the end-user. - Auto-Open Browser: Launches your default browser to the app interface immediately upon startup.
- Backend: Node.js, Express
- Tokenization: Tiktoken (OpenAI)
- Frontend: HTML5, TailwindCSS, Vanilla JavaScript
-
Clone the repository:
git clone https://github.com/your-username/code-context-aggregator.git cd code-context-aggregator -
Install dependencies:
npm install
-
Run the server:
node server.js
The app will automatically open at
http://localhost:3000.
To create a single executable file for Windows users:
npm run buildThis will generate code_aggregator.exe in the root directory.
- Launch: Open the EXE or run the server.
- Project Path: Enter the absolute path to your project folder.
- Extensions: Click ✨ Auto-Detect to find all extensions. The app will pre-check code files for you.
- Scan: Click 🔍 Load Visual File Tree.
- Refine: Use the checkboxes and collapse/expand arrows to select the exact files you need.
- Generate: Click 🚀 GENERATE CONTEXT.
full_context_partX.txt: Contains the actual code.structure.txt: Contains the visual ASCII tree.
This project is licensed under the ISC License.