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:
- Open the Extensions panel (
Cmd+Shift+X) - Search for "CodeLayers"
- 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:
| Color | Distance | Meaning |
|---|---|---|
| Red | Hop 0 | The changed file itself |
| Orange | Hop 1 | Direct dependents — files that import the changed file |
| Yellow | Hop 2 | Second-degree dependents |
| Green | Hop 3 | Third-degree dependents |
| Blue | Hop 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):
| Command | Description |
|---|---|
| CodeLayers: Analyze Blast Radius | Start or restart dependency analysis |
| CodeLayers: Refresh | Force re-analysis of the current file |
| CodeLayers: Filter Dependencies | Cycle through filter modes (all / functions / imports) |
| CodeLayers: Toggle Blast Radius | Enable or disable blast radius analysis |
| CodeLayers: Toggle Decorations | Show or hide color-coded file decorations |
| CodeLayers: Show Callers | List all files that call the selected symbol |
| CodeLayers: Trace Downstream | List all files affected by the selected symbol |
| CodeLayers: Go to Symbol | Jump to a symbol definition from the sidebar |
Configuration
Customize the extension in your VS Code settings (Cmd+,):
| Setting | Default | Description |
|---|---|---|
| codelayers.maxHops | 3 | How many hops to trace through the dependency graph (1–10) |
| codelayers.showCodeLens | true | Show inline caller counts and trace links above symbols |
| codelayers.defaultFilterMode | all | Initial filter mode: all, functions, or imports |
| codelayers.warningThreshold | 20 | Number of affected files that triggers a warning in the status bar |
| codelayers.cliPath | auto-detect | Custom 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
- Open a Git repository in VS Code — the extension activates automatically
- Edit and save any supported file
- The CLI parses your code with tree-sitter and builds the dependency graph
- The extension traces reverse import edges from the changed file (BFS)
- Sidebar updates showing affected files grouped by hop distance
- Decorations appear on files in the explorer and editor tabs
- 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 CLI — install instructions
- A Git repository open as workspace