Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>ContextualNew to Visual Studio Code? Get it now.
Contextual

Contextual

Denis Panov

|
68 installs
| (0) | Free
Effortlessly copy file and folder content as context for ChatGPT and other LLMs, with smart .gitignore handling and token counting
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Contextual for VS Code

Contextual Logo

Version Downloads Rating License: MIT

Install from VS Code Marketplace

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:

  1. Open VS Code
  2. Open the Extensions view (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "Contextual"
  4. 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
  • Uses the same syntax as .gitignore

Development

Prerequisites

  • VS Code
  • Bun

Setup

git clone https://github.com/denispanov/contextual.git
cd contextual
bun install
bun run watch

Testing

  1. Press F5 to launch the Extension Development Host
  2. Make changes and reload the window to test

Contributing

We welcome contributions! For significant changes, please open an issue first to discuss your proposal.

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to your branch
  5. Open a Pull Request

License

MIT License

Acknowledgments

  • Built with Bun
  • Uses tiktoken for token counting
  • ignore for gitignore processing
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft