Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Codebase to AI ContextNew to Visual Studio Code? Get it now.
Codebase to AI Context

Codebase to AI Context

Offline AI Toolbox

|
1 install
| (1) | Free
Package clean code context for Codex, ChatGPT, Claude, and other AI coding tools.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Codebase to AI Context

Package clean code context for Codex, ChatGPT, Claude, and other AI coding tools.

This extension is built for developers who want to stop manually copying file paths, selections, and project structure before asking an AI assistant for help.

Why use it

AI coding assistants are much better when you give them clean context:

  • which file the code came from;
  • which lines are relevant;
  • what the project structure looks like;
  • which open files belong together.

Codebase to AI Context turns that into one clipboard action.

Screenshots

Open Editors Context Pack

Fast Commands from VS Code

Commands

  • AI Context: Copy Selection with Path
  • AI Context: Copy Current File
  • AI Context: Copy Project Tree
  • AI Context: Copy Open Editors Context Pack

What it does

  • Adds file path and line numbers to copied selections.
  • Wraps code in Markdown fences.
  • Generates a compact workspace tree.
  • Packages open workspace files together with the project tree.
  • Ignores noisy folders such as .git, node_modules, dist, build, .next, out, and coverage.
  • Adds a per-file character limit for open editor context packs to avoid accidentally pasting huge files.

Usage

  1. Open a project folder in VS Code.
  2. Open the files you want to include.
  3. Run AI Context: Copy Open Editors Context Pack from the Command Palette.
  4. Paste the generated context into Codex, ChatGPT, Claude, or another AI coding assistant.

For smaller questions, select code and run AI Context: Copy Selection with Path.

Settings

  • codebaseToAiContext.maxTreeDepth
  • codebaseToAiContext.maxChildrenPerDirectory
  • codebaseToAiContext.ignoredDirectories
  • codebaseToAiContext.maxDocumentCharacters

MVP boundary

This extension does not upload your code anywhere. It only reads local workspace files and writes generated context to your clipboard.

Roadmap

  • Multi-file context pack.
  • Token estimate.
  • Custom prompt templates.
  • Recent context history.
  • Pro license activation.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft