Contextual is an extension that simplifies sharing code context with ChatGPT and other LLMs. It works with VS Code and popular forks like Cursor, Windsurf, and Trea. The extension provides intelligent file and folder copying with built-in .gitignore support and real-time token counting.
Features
Context Management
Copy contents from files, folders, or your entire workspace
Support for multi-file selection
Automatic .gitignore pattern recognition
Custom .contextignore file support for additional exclusions
Performance & Efficiency
Built with Bun for optimal performance
Asynchronous processing
Minimal resource usage
Token Analytics
Real-time character count
Accurate token estimation (via tiktoken)
Installation
You can install Contextual directly from the VS Code Marketplace:
Open VS Code
Open the Extensions view (Ctrl+Shift+X / Cmd+Shift+X)
Search for "Contextual"
Click Install
Usage
Context Menu
Right-click any file or folder
Select "Contextual: Copy Content"
Paste into your LLM chat
Command Palette
Press Ctrl+Shift+P / Cmd+Shift+P and choose:
Copy File Content
Copy Folder Content
Copy Workspace Content
Copy Selected Content
Multiple Files
Select files/folders using Ctrl/Cmd or Shift
Right-click and select "Copy Selected Content"
Configuration
Ignore Patterns
Automatically respects your project's .gitignore patterns
Create a .contextignore file in your workspace to specify additional files and patterns to exclude