Skip to content
CodeLayersCodeLayers

VS Code Extension

The CodeLayers — Blast Radius extension brings real-time dependency analysis directly into VS Code. See which files are affected by your changes without leaving your editor.

Completely free. No account, no subscription, no data leaves your machine.

Install from VS Code Marketplace


Installation

1. Install the CLI

The extension requires the codelayers CLI binary:

curl -fsSL https://codelayers.ai/install.sh | bash

Or with Homebrew:

brew install codelayers-ai/tap/codelayers

2. Install the Extension

From VS Code:

  1. Open the Extensions panel (Cmd+Shift+X)
  2. Search for "CodeLayers"
  3. Click Install

From the command line:

code --install-extension codelayers.codelayers

From VS Code Quick Open (Cmd+P):

ext install codelayers.codelayers

The extension activates automatically when you open a Git repository. If the CLI isn't installed, it will prompt you to install it.


Features

Blast Radius Sidebar

When you save a file, the extension analyzes the dependency graph and shows which files are affected in a dedicated sidebar panel. Files are organized by hop distance — how many steps away they are in the dependency chain.

Color-Coded Decorations

Files in your explorer and editor tabs receive visual markers based on their distance from the changed file:

ColorDistanceMeaning
RedHop 0The changed file itself
OrangeHop 1Direct dependents — files that import the changed file
YellowHop 2Second-degree dependents
GreenHop 3Third-degree dependents
BlueHop 4+Distant dependents

CodeLens Annotations

Inline annotations appear above symbols showing:

  • Callsite counts — how many files call this function/class
  • Trace downstream — click to see all files affected by this symbol

Real-Time Analysis

Changes trigger automatic re-analysis with a 150ms debounce on every file save. No manual refresh needed.

Filter Modes

Cycle between three dependency views:

  • All — every dependency type
  • Functions — function/method calls only
  • Imports — import/export relationships only

Commands

Access via Command Palette (Cmd+Shift+P / Ctrl+Shift+P):

CommandDescription
CodeLayers: Analyze Blast RadiusStart or restart dependency analysis
CodeLayers: RefreshForce re-analysis of the current file
CodeLayers: Filter DependenciesCycle through filter modes (all / functions / imports)
CodeLayers: Toggle Blast RadiusEnable or disable blast radius analysis
CodeLayers: Toggle DecorationsShow or hide color-coded file decorations
CodeLayers: Show CallersList all files that call the selected symbol
CodeLayers: Trace DownstreamList all files affected by the selected symbol
CodeLayers: Go to SymbolJump to a symbol definition from the sidebar

Configuration

Customize the extension in your VS Code settings (Cmd+,):

SettingDefaultDescription
codelayers.maxHops3How many hops to trace through the dependency graph (1–10)
codelayers.showCodeLenstrueShow inline caller counts and trace links above symbols
codelayers.defaultFilterModeallInitial filter mode: all, functions, or imports
codelayers.warningThreshold20Number of affected files that triggers a warning in the status bar
codelayers.cliPathauto-detectCustom path to the codelayers binary (if not in PATH)

Example settings.json:

{
  "codelayers.maxHops": 5,
  "codelayers.showCodeLens": true,
  "codelayers.defaultFilterMode": "functions",
  "codelayers.warningThreshold": 30
}

How It Works

  1. Open a Git repository in VS Code — the extension activates automatically
  2. Edit and save any supported file
  3. The CLI parses your code with tree-sitter and builds the dependency graph
  4. The extension traces reverse import edges from the changed file (BFS)
  5. Sidebar updates showing affected files grouped by hop distance
  6. Decorations appear on files in the explorer and editor tabs
  7. CodeLens annotations show callsite counts above symbols

The analysis runs entirely locally — your code never leaves your machine. No account or network connection required.


Supported Languages

The extension supports the same 10 languages as the CodeLayers CLI:

Rust, TypeScript, JavaScript, Python, Java, Go, C++, C#, Ruby, PHP, and Swift.


Requirements

  • VS Code 1.85.0 or later
  • CodeLayers CLIinstall instructions
  • A Git repository open as workspace