Skip to content

nestchao/Code-Context-Aggregator

Repository files navigation

Code Context Aggregator Web

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.

🚀 Key Features

  • 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 tiktoken for 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 .exe for Windows. Zero dependencies for the end-user.
  • Auto-Open Browser: Launches your default browser to the app interface immediately upon startup.

🛠️ Technology Stack

  • Backend: Node.js, Express
  • Tokenization: Tiktoken (OpenAI)
  • Frontend: HTML5, TailwindCSS, Vanilla JavaScript

📥 Installation (For Developers)

  1. Clone the repository:

    git clone https://github.com/your-username/code-context-aggregator.git
    cd code-context-aggregator
  2. Install dependencies:

    npm install
  3. Run the server:

    node server.js

    The app will automatically open at http://localhost:3000.

📦 How to Build the Standalone EXE

To create a single executable file for Windows users:

npm run build

This will generate code_aggregator.exe in the root directory.

📖 Usage Guide

  1. Launch: Open the EXE or run the server.
  2. Project Path: Enter the absolute path to your project folder.
  3. Extensions: Click ✨ Auto-Detect to find all extensions. The app will pre-check code files for you.
  4. Scan: Click 🔍 Load Visual File Tree.
  5. Refine: Use the checkboxes and collapse/expand arrows to select the exact files you need.
  6. Generate: Click 🚀 GENERATE CONTEXT.
    • full_context_partX.txt: Contains the actual code.
    • structure.txt: Contains the visual ASCII tree.

📄 License

This project is licensed under the ISC License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors