Code Context Generator

A VS Code extension to instantly generate codebase context for LLMs.

View on GitHub

Purpose

Feeding your local files into Large Language Models (like ChatGPT, Claude, or local AI) can be tedious. Code Context Generator solves this by reading your project's complete code structure and automatically generating a clean, unified codecontext.txt file containing your visual folder hierarchy and the raw code of your files.

It intelligently respects your .gitignore rules and filters out heavy dependencies and binaries so your context window remains clean and secure.

How to Use

  1. Open your project in Visual Studio Code.
  2. Method 1: Right-click on any specific folder in your File Explorer and select Generate Code Context.
  3. Method 2: Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P) and run Generate Code Context to parse the entire root workspace.
  4. A codecontext.txt file will be instantly generated at the target location.

Tech Stack

Built with performance and native integration in mind:

TypeScript Node.js API (fs, path) VS Code Extension API