Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>CodeContext ToolkitNew to Visual Studio Code? Get it now.
CodeContext Toolkit

CodeContext Toolkit

Rasool Zia

| (0) | Free
Developer toolkit for exporting, importing, exploring, and sharing project context.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CodeContext

CodeContext is a VS Code extension for exporting, importing, and sharing developer project context with AI.

Turn files, folders, project structure, paths, and Git changes into AI-friendly context. Import generated context back into a workspace when you need to recreate files or project structure.

Exports open as editable untitled documents. Nothing is written to your workspace unless you explicitly save or create the files.

Why CodeContext?

When working with AI coding assistants, you often need to provide more than a single file.

You may need:

  • several related files
  • a project's directory structure
  • a list of relevant file paths
  • the changes you are currently working on
  • the complete before/after state of changed files
  • or enough project context to recreate a structure somewhere else

CodeContext provides these workflows directly inside VS Code instead of making you manually copy files, build folder trees, or assemble Git context yourself.

Features

Export Content

Export one or more files, folders, or the complete workspace as Markdown containing file paths and contents.

Useful for sharing implementation context with AI assistants.

Read the Export Content documentation

Export Project Tree

Export a deterministic project directory tree without reading or including file contents.

Useful when an AI assistant needs to understand the structure of a project before working with its files.

Read the Export Project Tree documentation

Export Paths

Export workspace-relative file paths as a structured text document.

# Export Paths

src/app/page.tsx
src/components/Button.tsx
src/lib/utils.ts

Useful for quickly sharing a list of relevant files or feeding paths into another workflow.

Read the Export Paths documentation

Import Content

Paste CodeContext Markdown generated by an AI or another CodeContext export and recreate or update files in the workspace.

Before modifying existing files, CodeContext validates the input and asks for overwrite confirmation.

Read the Import Content documentation

Import Project Tree

Create directories and empty files from a project tree without changing existing files.

Useful for recreating project structure before filling files with content.

Read the Import Project Tree documentation

Import Paths

Create directories and empty files from a newline-separated path list.

Existing files are preserved.

Read the Import Paths documentation

Route Report

Analyze the workspace and generate a Markdown report of application routes for supported web frameworks.

Supported frameworks: Next.js (App Router and Pages Router) and Nuxt (pages/ and app/pages/ conventions).

Framework detection is automatic. If multiple frameworks are found, a picker lets you choose. Open the editable Markdown report or use Route Report Preview to open it in VS Code's Markdown preview.

Read the Route Report documentation

Generate Context from Paths

Paste a list of workspace-relative file paths and choose what kind of context to generate:

  • Content — produces the same # Code Context Markdown as Export Content
  • Git Diff — produces the same # Git Diff output as Git Diff, scoped to the provided paths

Useful when you already know which files are relevant and want to generate context without navigating the Explorer.

Read the Generate Context from Paths documentation

Git Diff

Export the current Git changes as a patch.

Git Diff includes:

  • tracked changes
  • staged and unstaged changes
  • deleted files
  • renamed files
  • untracked files as additions
  • Git metadata and standard diff context

From the Explorer context menu, Git Diff can be scoped to one or more selected files or folders. Without an Explorer selection, it operates across the workspace repositories.

Read the Git Diff documentation

Before/After Git Context

Export the complete file contents before and after the current Git changes.

For changed files:

  • Before is the complete file at HEAD
  • After is the complete file in the current working tree
  • untracked files have an empty before state
  • deleted files have an empty after state
  • renamed files preserve their old and new paths

Selections from the Explorer can scope the export to specific files or folders.

Read the Before/After Git Context documentation

Export and Import Workflow

CodeContext is designed around a simple two-way workflow:

VS Code project
      │
      ├── Export Content
      ├── Export Tree
      ├── Export Paths
      └── Git Context
              │
              ▼
        AI / Human / File
              │
              ▼
      CodeContext Import
              │
              ├── Content
              ├── Project Tree
              └── Paths
              │
              ▼
        VS Code project

This makes CodeContext useful both for giving project context to AI and for turning structured AI-generated context back into files.

Usage

All commands are available from the Command Palette under the CodeContext category.

Export commands open editable untitled documents:

  • CodeContext: Export Content
  • CodeContext: Export Project Tree
  • CodeContext: Export Paths
  • CodeContext: Git Diff
  • CodeContext: Before/After Git Context
  • CodeContext: Route Report

Git commands and export commands that support Explorer resources can also be used from the Explorer context menu.

Import commands open the shared CodeContext Import panel:

  • CodeContext: Import Content
  • CodeContext: Import Project Tree
  • CodeContext: Import Paths
  • CodeContext: Generate Context from Paths

Typical AI workflow

  1. Select the files or folder relevant to your task.
  2. Export the project context you need.
  3. Paste or provide the generated context to your AI assistant.
  4. Let the AI analyze, modify, or generate the requested result.
  5. Import generated CodeContext content back into VS Code when appropriate.
  6. Review the changes before saving or committing them.

Safety and Validation

CodeContext validates imported paths before creating or modifying files.

The extension protects against common unsafe filesystem operations, including:

  • absolute paths
  • path traversal such as ../
  • paths escaping the workspace
  • conflicting file and directory paths
  • unsupported or unsafe symbolic-link traversal

Existing files are not overwritten silently.

Large or binary content is handled conservatively where appropriate, especially for Git context exports.

Requirements

  • Visual Studio Code 1.138.0 or newer
  • Git installed and available on PATH for Git Diff and Before/After Git Context

CodeContext has no runtime dependencies.

Current Limitations

CodeContext currently focuses on project files, structure, paths, Git context, and route reporting for Next.js and Nuxt.

Additional routing framework support (React Router, Vue Router, NestJS, etc.) is planned for a future release.

Git operations require a Git installation and an accessible repository. Very large or binary files may have their contents omitted from context exports where reading the content is not appropriate.

Documentation

Detailed feature documentation is available in the docs/features directory:

  • Export Content
  • Export Project Tree
  • Export Paths
  • Import Content
  • Import Project Tree
  • Import Paths
  • Git Diff
  • Before/After Git Context
  • Generate Context from Paths
  • Route Report

Architecture and development decisions are documented in:

  • Architecture
  • Roadmap
  • Project Decisions

Release

0.2.0

Added advanced project context workflows and route reporting.

  • Added Generate Context from Paths
  • Added Next.js route reporting
  • Added Nuxt route reporting, including Nuxt 4 app/pages
  • Added Route Report Preview
  • Added improved Git Diff and Before/After Git Context workflows
  • Added grouped Explorer context menus
  • Improved multi-root workspace support
  • Improved validation and deterministic output across export and import workflows

0.1.0

Initial public release.

  • Added project content export
  • Added project tree export
  • Added path export
  • Added content, tree, and path import workflows
  • Added editable export documents
  • Added Git Diff context export
  • Added Before/After Git Context export
  • Added Explorer context menu support
  • Added filesystem and import validation
  • Added deterministic output and automated tests

License

See LICENSE.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft