LLM Context Generator

This Visual Studio Code extension helps you generate LLM-ready context from your workspace files, making it easier to collaborate with AI models. The extension can automatically reference local code dependencies and respects your .gitignore rules to avoid including unnecessary files.
Features
- Generate LLM-ready context from the currently open file and its imports, your entire VS Code workspace or marked files
- Mark or unmark open files via Command Palette, or individual files and folders via the Explorer context menu
- Automatic file tracking updates marked files when they're moved or deleted
- Token count estimation for generated context
- Automatic support for multiple programming languages and file types
Usage
Mark Files for Context
Via Explorer:
- Right-click on one or more files or folders in the Explorer
- Select "Mark for LLM Context"
- Files appear in the Marked Files view
- Marking a folder includes all compatible files within it
Via Command Palette:
- Open a file
- Press
Ctrl+Shift+P (Windows) or Cmd+Shift+P (Mac)
- Select "Mark/Unmark File for LLM Context"
Generate Context
Three ways to generate context:
Current File + Imports:
- Open a file
- Command Palette → "Generate LLM Context (Current File + Imports)"
Workspace:
- Open a workspace
- Command Palette → "Generate LLM Context (Workspace)"
Marked Files:
- Mark desired files
- Command Palette → "Generate LLM Context (Marked Files)"
The generated context will be copied to your clipboard or opened in a new window, based on your settings.
Token Count Estimation
After generating context, you'll see an estimated token count. This helps you stay within AI model token limits. A warning appears if the context exceeds 8,000 tokens.
Configuration
Configure the extension in VS Code settings:
Credits
License
Released under the MIT License.
| |