Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>CodeBrain LGENew to Visual Studio Code? Get it now.
CodeBrain LGE

CodeBrain LGE

sang2.nguyen-LGE

|
38 installs
| (0) | Free
Local semantic code intelligence for VS Code: native-accelerated runtime, MCP, impact analysis, affected tests, workflow graphs, and read-only AI review.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CodeBrain for VS Code

CodeBrain helps AI understand your codebase using a local semantic code graph, bypassing the need for tedious manual context gathering or repository-wide search loops. It integrates a native-accelerated runtime, Model Context Protocol (MCP) server, Agent Skill, custom Chat Participant, independent AI code review, change impact analyzer, affected test finder, and interactive visualization dashboard right inside VS Code.


🚀 Getting Started

1. Installation

CodeBrain is a single, small VS Code extension (.vsix) for every operating system. The CodeGraph runtime it runs — a self-contained Node.js, the indexer and MCP server, and the native Rust kernel — is published on npm as @xuansang2770/codegraph, and CodeBrain installs and updates it for you. You do not need to install Node.js or any CLI yourself.

To install:

  1. Open VS Code.
  2. Open the Command Palette (Ctrl+Shift+P on Windows/Linux, Cmd+Shift+P on macOS).
  3. Run Extensions: Install from VSIX... and choose codebrain-<version>.vsix (or install it from the Marketplace).
  4. Reload VS Code when prompted.

On first start CodeBrain downloads the runtime for your platform (macOS, Linux or Windows, x64 or arm64 — roughly 100 MB, once) into its own storage folder; a notification shows the progress. After that it checks npm in the background and switches to new releases on its own.

  • npm installed? CodeBrain uses it, so your .npmrc registry, proxy and auth token apply.
  • No npm? It downloads the package straight from the registry and verifies its checksum.
  • Internal mirror / offline machine? Set codebrain.runtime.registry to your mirror, or unpack @xuansang2770/codegraph-<platform> yourself and point codebrain.runtime.path at it.

2. Initializing Your Workspace

Before querying CodeBrain, you must index your repository:

  1. Open your workspace folder in VS Code.
  2. Run the command CodeBrain: Initialize Workspace from the Command Palette.
  3. This creates a local .codegraph/ directory in your workspace root.
  4. Check the Status Bar for progress. Once indexing finishes, the status bar will show CodeBrain: Ready.

[!NOTE] Initial indexing might take some time on large codebases. Subsequent updates are incremental and extremely fast.


🛠️ Main Features

💬 VS Code Chat Participant (@codebrain)

Interact directly with your codebase using the @codebrain participant. It automatically detects the language of your prompt (supporting English, Vietnamese, and others) and formats headings, explanations, and diagrams in that language.

  • /explain: Explains the business workflow and maps each step to a concrete, developer-readable code flow.

    • Example: @codebrain /explain How does the authentication middleware work?
    • It generates a structured Markdown report with business steps, a pseudo-code walkthrough, and Mermaid diagrams of the execution path.
  • /review: Reviews active changes or selection against codebase conventions and architecture.

    • Example: @codebrain /review Review my current changes
    • It analyzes Git diffs and call paths to return risk levels (Critical/High/Medium/Low), structural bugs, boundary cases, and release recommendations.
    • Ask about impact — "which tests are affected by my changes?" — and the review also includes the deterministic affected-test analysis.
  • /implement: Plans a feature or Jira ticket — acceptance criteria, where the change plugs in, file-by-file steps, tests, and risks — then hands the plan to the CodeBrain Dev agent to edit, test, and self-review. Copy prompt for another agent gives the same plan to Claude Code, Cursor, Codex, or any other agent.

    • Example: @codebrain /implement ABC-123 or @codebrain /implement Add rate limiting to the login endpoint
  • /fix: Analyzes a reported bug, traces the failure path and root cause, and proposes a safe solution with a focused validation plan. The report itself does not edit files; Apply fix with CodeBrain Dev hands it to the agent to write the failing test, fix, and verify.

    • Example: @codebrain /fix Login returns 401 after the token refresh succeeds
  • /test: Writes unit tests for your changes and for the callers they could break, in your project's existing framework, file layout and mocking style. Create test files previews and creates them; Run these tests runs them.

    • Example: @codebrain /test Cover the new discount rules and the checkout callers
  • /pr: Writes the pull request description for your branch from its diff against the base branch, its commits, the Jira ticket and the change impact — summary, acceptance-criteria table, blast radius and risk, tests to run, safety checklist, rollback. Copy PR description puts it on the clipboard; with the GitHub Pull Requests extension installed, Create Pull Request opens its create view.

    • Example: @codebrain /pr
  • Apply to Workspace: when /fix, /implement or /test proposes concrete code, one click opens a diff for every proposed file and applies them only after you confirm. Edited files stay unsaved, so the editor's undo still works; a proposal that no longer matches your code is skipped and named rather than applied somewhere you did not see.

  • Jira and Confluence context, automatically. When the question names a Jira key — or your branch carries one, like feature/ABC-123-reset — every command reads the ticket, its comments and acceptance criteria, and the linked Confluence spec first. /explain then points out where the code drifts from the spec, and /review adds an acceptance-criteria coverage table.

  • User guides: ask /explain for a "user guide" (or "hướng dẫn sử dụng") and you get a step-by-step guide — prerequisites, steps, examples, troubleshooting — instead of a code walkthrough.

    • Example: @codebrain Write a user guide for automatic index refresh

🤖 One developer agent in every AI tool

The same four workflows — explain, implement, fix, review — work in Copilot, Claude Code, Codex, Gemini CLI, Antigravity, Cursor, and opencode:

  • Skills: CodeBrain: Set Up Agents installs codebrain-explain, codebrain-implement, codebrain-fix, and codebrain-review next to the general codebrain skill. Agents load them when the task matches; in Claude Code they are also slash commands (/codebrain-implement ABC-123). Agents that already have the CodeBrain skill get the new ones on the next update.
  • Slash commands over MCP: the CodeBrain Atlassian server offers the same workflows as MCP prompts, which Claude Code, Copilot, Gemini CLI and other hosts list as slash commands.
  • codebrain_task_context: one call returns a ticket, its comments, extracted acceptance criteria, the related Confluence spec, and the code names to explore next — the starting point of every workflow.
  • CodeBrain Dev agent in Copilot: edits, runs tests, and checks problems, with a one-click handoff to CodeBrain Reviewer when it is done.
  • Subagents: the same command installs codebrain-dev and the read-only codebrain-reviewer as native subagents for Claude Code (.claude/agents/) and opencode.
  • Ticket hook for Claude Code: with Atlassian configured, setup adds a UserPromptSubmit hook to Claude Code. A prompt that names a Jira key — or works on your branch's ticket ("implement the rest") — arrives with the ticket, its acceptance criteria and spec attached, once per session. Pause it with CODEBRAIN_NO_PROMPT_HOOK=1.

Jira and Confluence writes (comments, transitions) still happen only when you ask and CodeBrain › Atlassian: Allow Write is on. No workflow commits or pushes on its own.

⚡ Blast Radius CodeLens

Every file shows its blast radius above line 1 — no command needed:

⚡ CodeBrain: 23 dependents · 2 affected tests
🧪 Run 2 affected tests

Click the first lens to run a full impact analysis, or the second to run just those tests. Turn it off with codebrain.codeLens.enabled.

In files you have changed, every function and method also gets its own lens:

⑂ 7 callers in 4 files   ▶ Run 2 affected tests

Click the caller count to jump to a caller or start an impact analysis. Caller counts are fetched only for lenses on screen. Set codebrain.codeLens.symbols to allFiles to show them everywhere, or off.

🧪 Run Affected Tests

CodeBrain finds which tests matter, then runs them. Available from the CodeLens, the Source Control title bar, the impact panel, or CodeBrain: Run Affected Tests.

It detects your project's runner — Vitest, Jest, Playwright, Mocha, pytest, go test, RSpec, PHPUnit, Cargo, Maven, Gradle, dotnet test — and always shows the command for confirmation before running it, because the detected runner can be wrong. Set codebrain.tests.command (with ${files}) to skip detection.

🔍 Change Impact & Affected Tests

Analyze changes from tracked, staged, or untracked Git files (falling back to the active file if the repository is clean) using:

  • Command: CodeBrain: Analyze Change Impact
  • Chat: @codebrain /review Which tests are affected by my changes?

The engine will:

  1. Traverse call graphs to find affected dependencies up to a configurable depth.
  2. Locate affected test files (e.g., .test.*, .spec.*, tests/).
  3. Classify risk levels based on fan-out, public contracts, and test coverage gaps.
  4. Check whether the traversal stopped at its depth limit. If it did, the dependent counts are reported as a lower bound (≥ N) with a visible warning, instead of being presented as the full blast radius.

✨ Generate a Commit Message

Click the sparkle icon in the Source Control title bar and CodeBrain writes the commit message straight into the message box.

It describes your staged changes — exactly what the next commit will contain — and falls back to the whole working tree when nothing is staged yet. If the box already had text, the notification offers Undo to put it back.

Your convention, not ours. Run CodeBrain: Choose Commit Message Format (also in the Source Control ⋯ menu) and pick one — the picker shows a real example of each rather than a name to guess at:

Format Looks like
Conventional Commits feat(auth): add refresh tokens
Issue key + summary TPLD-958: Fix Chart lag issue, a blank line, then a nested - / + / * detail list
Plain summary Fix chart lag when the window is resized

Set codebrain.commit.language to write in another language — Vietnamese, for instance. Identifiers, paths and issue keys are left as they are.

The prompt also carries the current branch name and the last few commit subjects, so a format can take the issue key from feature/TPLD-958-chart-lag and match the style already in the repository. When the branch has no issue key, the prefix is dropped rather than invented.

Need something none of those cover? Pick Custom template… in the same list (or run CodeBrain: Customize Commit Message Template) to create .codebrain/commit-template.md, seeded with whichever format is active so you start from working text instead of a blank page. That file replaces the built-in format — a rule you delete stops being applied — and it is read from the repository root, so committing it gives your whole team the same convention. Delete it to go back to the picker. codebrain.commit.templateFile points somewhere else if you keep conventions in another file.

The message uses the model chosen with CodeBrain: Choose AI Model.

🧠 Independent AI Code Review

Run CodeBrain: Review Changes from the Source Control title menu or Command Palette for a review that is independent of Copilot Review.

The command combines the current Git diff with CodeGraph evidence and calls a model directly through the VS Code Language Model API. Part of that evidence is CodeGraph's own codegraph_review report: which symbols the changed lines live in, signatures that changed or exports that were removed while call sites outside the diff still use them, the blast radius, and the changed symbols no test reaches — computed from the graph, each with a file:line, so the model verifies concrete breakages instead of guessing at them. Uncommitted work is measured against HEAD, and a commit picked in @codebrain /review against its parent. It produces a temporary Markdown report containing:

  • Verdict and merge recommendation.
  • Critical, high, medium, and low findings.
  • File and line references when available.
  • Affected workflows and graph evidence.
  • Affected tests and missing test coverage.
  • Inline diagnostics in the reviewed files and the Problems panel.

Findings persist across window reloads, and re-anchor to the reviewed line's content after you edit a file — telling you when a finding moved, and admitting when the reviewed line no longer exists rather than pointing at the wrong code.

Disagreeing with a finding. Use the lightbulb to dismiss a false positive (it stays hidden in future reviews too) or to explain it in chat. You can also reply directly in the finding's comment thread to ask CodeBrain about it. Restore everything with CodeBrain: Restore Dismissed Review Findings.

The report is also stored as the latest CodeBrain report and can be exported with CodeBrain: Export Latest Report as Markdown. This workflow does not read or depend on Copilot Review comments. The configured CodeBrain model is used by extension-owned AI commands; ChatParticipant requests continue using the model selected in VS Code Chat.

Use CodeBrain: Choose AI Model to select the model used by CodeBrain: Review Changes and future extension-owned AI commands. Leave the setting empty to use the first available provider model.

📊 Interactive Workflow Graph

Run CodeBrain: Open Workflow Graph to visualize the impact path:

Changed Files ──> Dependents / Workflows ──> Affected Tests
  • Click any node to open the corresponding source file and line.
  • The interface displays the active engine (Rust native or WASM fallback).

📈 Context Cost Dashboard

See what the graph context cost versus reading the same files in full.

  • Command: CodeBrain: Token Savings Dashboard
  • Shows measured baselines, avoided file reads, and query latency.

How the comparison is measured. CodeBrain takes the files it actually drew evidence from, reads their real sizes on disk, and converts both sides at the same ratio (4 bytes ≈ 1 token). When no candidate file can be measured, it reports the saving as unknown rather than showing a number.

[!TIP] All metrics are stored locally inside VS Code's workspace state. No telemetry or billing data is uploaded. These are context-size estimates, not model billing data.

📑 Executive ROI Report

CodeBrain: Export Executive ROI Report turns this workspace's recorded activity into a report for managers: an executive summary, key indicators grouped as AI cost, developer velocity and quality, weekly and monthly trends with charts, and the engineer-hours saved per activity.

  • Formats: HTML (charts and tables; print to PDF from a browser), Markdown (for Confluence or a wiki), JSON (add up several developers' reports for a team total).
  • Periods: last 30 days, last 90 days, this year, or all recorded history.
  • Measured vs estimated. Token savings and avoided file reads are measured from real file sizes. Hours are estimates — activity counts × the minutes in codebrain.roi.* — and every assumption is printed in the report. Activities without an agreed figure default to 0 minutes, so they add no hours until your team sets one. Only affected-test runs that targeted the affected files count toward test time saved.

🔧 CodeBrain Tools for Other Agents in VS Code

Copilot's agent mode, and any agent that uses VS Code's language-model tools, can call CodeBrain directly:

Tool Reference What it returns
codebrain_get_impact #codebrainImpact Dependents, affected tests, risk and reasons for the working-tree changes or given files
codebrain_get_affected_tests #codebrainAffectedTests The test files to run instead of the full suite
codebrain_explore_symbol #codebrainExplore Verbatim line-numbered source, call paths and blast radius for named symbols
codebrain_get_review_plan #codebrainReviewPlan The working-tree changes split into review batches, with a checklist per file type and the files filtered out as noise

🩺 Index Status & Coverage

CodeBrain: Show Index Status opens a panel showing:

  • Files, symbols, and relationships indexed, broken down by language.
  • Tracked only files — indexed for change detection but with no symbols extracted, so they cannot appear inside a call path.
  • Coverage gaps — workspace files missing from the index. This matters: a source language the parsers do not support is simply absent from the graph, so any impact analysis that should have crossed it is incomplete with no error to tell you.
  • Warnings when the last index run dropped files, left references unresolved, or was built by an older engine.

🗂️ Monorepo Support

When a workspace holds several indexed projects, CodeBrain: Choose Project pins which one CodeBrain answers for. By default it follows the nearest indexed project above whichever file is open.

🤖 Read-only CodeBrain Reviewer Agent

Use the custom agent CodeBrain Reviewer in VS Code Chat. It is granted CodeBrain-specific graph query tools without write or terminal permissions—ideal for secure, evidence-based code reviews and release assessments.

📄 Exportable Markdown Reports

Save generated reviews or explanations using the command CodeBrain: Export Latest Report as Markdown. Keep a lightweight record of complex analysis to review, share, or feed back to other AI models.

🔌 CodeBrain for Every Agent — MCP Server + Skill

Two things make CodeBrain useful to an agent: the MCP server, which gives it the graph tools, and the skill, which tells it when and how to use them. Inside VS Code, Copilot gets both from the extension itself. Every other agent reads its own files, so run CodeBrain: Set Up Agents, choose a scope, tick the agents you use, and restart them.

MCP server

Agent Global — every project This workspace only
Claude Code ~/.claude.json <workspace>/.mcp.json
Codex CLI ~/.codex/config.toml —
Gemini CLI ~/.gemini/settings.json <workspace>/.gemini/settings.json
Antigravity ~/.gemini/config/mcp_config.json —
GitHub Copilot CLI ~/.copilot/mcp-config.json <workspace>/.github/mcp.json
Cursor ~/.cursor/mcp.json <workspace>/.cursor/mcp.json
opencode ~/.config/opencode/opencode.jsonc <workspace>/opencode.jsonc

The server offers two tools: codegraph_explore for understanding code, and codegraph_review for reviewing a change set (changed signatures and removed exports whose callers outside the diff still use them, blast radius, untested changed code). Turn the second off with codebrain.mcp.reviewTool; registered agents are updated either way.

Cursor starts MCP servers from the wrong folder, so its entry adds --path (${workspaceFolder} globally, the absolute folder per workspace). opencode's config is edited in place, so comments in opencode.jsonc survive.

Skill — every agent gets a native Agent Skill (codebrain/SKILL.md), which the agent loads only when a request matches its description — never text pasted into an instructions file that is sent with every request:

Agent Global This workspace only
Claude Code ~/.claude/skills/codebrain/ <workspace>/.claude/skills/codebrain/
Codex CLI ~/.agents/skills/codebrain/ <workspace>/.agents/skills/codebrain/
Gemini CLI ~/.gemini/skills/codebrain/ <workspace>/.gemini/skills/codebrain/
Antigravity ~/.gemini/config/skills/codebrain/ <workspace>/.agents/skills/codebrain/
GitHub Copilot (CLI, github.com, other editors) ~/.copilot/skills/codebrain/ <workspace>/.github/skills/codebrain/
Cursor ~/.cursor/skills/codebrain/ <workspace>/.cursor/skills/codebrain/
opencode ~/.config/opencode/skills/codebrain/ <workspace>/.opencode/skills/codebrain/

Every agent is given the same text — skills/codebrain/SKILL.md, the file Copilot in VS Code already receives — so there is no second copy to drift. It tells the agent when to use codegraph_explore instead of grep and file reads, and how to query it: name the symbols that span the flow, pass projectPath in a monorepo, trust the returned source instead of re-reading it. If an earlier build installed the skill as a Codex prompt, a Gemini command, or a marked section in GEMINI.md / copilot-instructions.md, that copy is replaced by the native skill automatically; your own text around a marked section is kept.

Which scope? Global is usually what you want: the MCP entry carries no workspace path, so each agent starts the server in whatever folder you are working in and CodeBrain answers from the nearest indexed project — one installation covers every repository you open. Pick the workspace scope when it should travel with the repository (.mcp.json and the skill files hold no tokens) or when only this project should see it. Codex CLI and Antigravity have no project-scoped MCP configuration, so their server entry is only offered globally; the skill works at both scopes everywhere.

Every MCP entry runs the CodeGraph runtime CodeBrain installed, through its own bundled Node, so there is no npm i -g and no PATH surprise when an agent is launched from a GUI. A repository with no .codegraph/ yet simply reports that it is not indexed; run CodeBrain: Initialize Workspace there.

Each runtime version lives in its own folder, so an update — or an extension update that changes the skill text — would leave agent configs pointing at the old one. CodeBrain rewrites what it already owns right after every update and on each start, at whichever scope you installed it, so an agent keeps working without you re-running anything (restart the agent to pick up the new version). CodeBrain: Uninstall CodeBrain from Agents sweeps both scopes and both halves, so nothing is left behind.

📋 Jira Board with Branch Mapping

A CodeBrain icon in the Activity Bar opens a Jira Board that runs on the same credentials as the Atlassian MCP server — no second login. CodeBrain: Open Jira Board opens the wide version with charts in an editor tab.

Filters, and what each one costs. Chips pick who (Mine, Reported, Watching, Everyone) and the progress columns (To do, In progress, Done); a dropdown filters by deadline (overdue, today, this week, no due date); and there is a project box, an open-sprints toggle, a sort order, and a search box that filters the loaded issues by key, summary, assignee, label or component as you type. Only the filters that belong in the query re-ask Jira — the rest narrow what is already loaded, so they are instant. Your choices are remembered per workspace.

Warnings, so nothing rots quietly. Tiles above the board count what needs attention: overdue, due soon (within codebrain.jira.dueSoonDays), stale (in progress, untouched for codebrain.jira.staleDays), unassigned, and in progress with no due date. Click a tile to see only those issues. Warnings are never reported on a finished issue. Each card also shows its own warnings, and carries a coloured edge for the most severe one.

Statistics. The full board adds a progress donut with the completion rate, a deadline distribution, workload per assignee, and a breakdown by status — all over the issues currently on screen, so a filter changes the charts with it.

Branch mapping. Each card knows the branches that carry its issue key, and one click does the right thing:

  • a local branch exists → switch to it (and CodeBrain asks first if uncommitted changes would be carried along);
  • only a teammate's remote branch exists → create a local branch tracking it;
  • neither → suggest a name from codebrain.jira.branchTemplate (default {prefix}/{key}-{summary}, so TPLD-958 becomes bugfix/TPLD-958-fix-chart-lag) and let you edit it before it is created. Accented summaries become readable ASCII, and a name git would refuse is corrected before it is offered.

Several branches carrying the same key are offered as a list rather than guessed at. CodeBrain: Check Out Branch for a Jira Issue does the same thing from the Command Palette or the Source Control menu, and Fetch branches picks up what teammates just pushed.

The reverse direction, passively. The status bar shows the issue key read from the current branch with its status, going amber when that issue is overdue — click it to open the ticket. A branch key is only trusted when its project is one the board actually loaded, so chore/node-22 is not reported as ticket NODE-22. Turn it off with codebrain.jira.statusBar.

Cards also offer Ask CodeBrain, which opens Chat with the ticket as the question, and Copy key for the commit message. With codebrain.atlassian.allowWrite on, a Move action transitions the issue — the same switch that governs agents, so the board is read-only until you say otherwise.

🔗 Jira & Confluence (Collab) Search for Every Agent

CodeBrain ships a second MCP server that lets an agent search your team's Confluence (Collab) and Jira from inside the task it is already working on — the ticket behind a branch name, the spec behind a design decision, the discussion that explains why the code looks the way it does.

Seven read tools: confluence_search, confluence_get_page, confluence_get_page_images, jira_search, jira_get_issue, jira_get_comments, jira_get_issue_images. Page bodies and issue descriptions come back in full, so the agent does not have to ask you to paste anything — and the image tools hand back the attached screenshots and diagrams as real images, so the agent can look at the crash instead of guessing from the prose around it.

Writing back is opt-in. Turn on codebrain.atlassian.allowWrite and the agent also gets jira_add_comment, jira_get_transitions, jira_transition_issue, jira_assign_issue, confluence_create_page, confluence_update_page and confluence_add_comment — enough to comment what it found, move a ticket to In Progress, take it, or write the finding up as a page. While the setting is off those tools are not offered to any agent at all, so the server can only read. Every write reports back exactly what changed (the new status, the new page version, a direct URL), and page updates default to appending rather than replacing, so an agent cannot quietly overwrite someone's document.

Setup — once, for all agents:

  1. Run CodeBrain: Atlassian (Jira + Confluence) and enter the base URLs and your personal access tokens.
    • Server / Data Center: create a token under Profile → Personal Access Tokens.
    • Cloud: use an API token and enter your account email when prompted. Confluence Cloud URLs must include the /wiki context path.
    • You can configure only Jira, only Confluence, or both — tools for an unconfigured product are never shown to the agent.
  2. GitHub Copilot picks the server up immediately, with no config file to edit.
  3. For Claude Code, Codex CLI, Gemini CLI, Antigravity, Cursor or opencode, run CodeBrain: Set Up Agents (again, if you ran it before configuring Atlassian), pick the ones you use, then restart that agent.

Where your credentials live: tokens go into the OS keychain via VS Code SecretStorage, and are mirrored once to ~/.codebrain/atlassian.env (owner-only, mode 0600) — the only way agents outside VS Code can read them. Every agent config file CodeBrain writes contains just the command to run, so a committed .mcp.json never leaks a token. Run CodeBrain: Atlassian (Jira + Confluence) again to edit, test, or clear the connection; CodeBrain: Remove from Agents removes the config entries. Test results also go to the CodeBrain Atlassian output channel.


⚙️ Configuration Settings

Customize CodeBrain by editing your .vscode/settings.json:

Setting Default Description
codebrain.runtime.autoUpdate true Install new CodeGraph runtime releases from npm in the background and repoint registered agents at them.
codebrain.runtime.version latest npm dist-tag or exact version (e.g. 1.6.1) to run. A pinned version is installed even with auto-update off.
codebrain.runtime.registry "" npm registry to install from. Empty uses your npm config, or https://registry.npmjs.org/ without npm.
codebrain.runtime.path "" A runtime directory you manage yourself (node, lib/, bin/). Disables the npm install and auto-update.
codebrain.mcp.reviewTool true Offer codegraph_review next to codegraph_explore on the CodeBrain MCP server, in VS Code and in every registered agent.
codebrain.autoRefresh.enabled true Keep the index fresh with CodeBrain's native file watcher.
codebrain.autoRefresh.debounceMs 1000 Quiet period (ms) before sync triggering.
codebrain.chat.maxContextFiles 12 Max files returned by CodeBrain for a chat report.
codebrain.chat.maxDiffCharacters 120000 Max Git diff size supplied to code review commands.
codebrain.chat.showTokenUsage true Show estimated token counts/latency in chat responses.
codebrain.ai.model "" Model id for CodeBrain-owned AI commands such as CodeBrain: Review Changes. Empty uses the first available model; it does not override ChatParticipant model selection.
codebrain.impact.maxDepth 5 Maximum dependency depth for affected-test detection.
codebrain.impact.detectDepthTruncation true Detect whether the traversal was cut short by maxDepth and report counts as a lower bound when it was.
codebrain.codeLens.enabled true Show each file's blast radius as a CodeLens above line 1.
codebrain.codeLens.symbols changedFiles Where to show the per-function N callers \| Run affected tests lens: changedFiles, allFiles, or off.
codebrain.roi.fullSuiteMinutes / codebrain.roi.affectedTestMinutes 20 / 1 Minutes a full-suite run and an affected-tests-only run take, for the ROI report's test-time estimate.
codebrain.roi.minutesSavedPerReview / …PerFix 35 / 100 Minutes one review or /fix analysis is assumed to save, for the ROI report.
codebrain.roi.minutesSavedPerExplain / …PerImplement / …PerTest / …PerPr 0 Minutes those answers are assumed to save; 0 counts none until your team sets a figure.
codebrain.tests.command "" Command for Run Affected Tests, using ${files}. Empty detects the runner and confirms first.
codebrain.metrics.enabled true Record local token savings and analytics.
codebrain.reports.openPreview true Automatically open generated Markdown reports in preview mode.
codebrain.releaseNotes.showOnUpdate true Open a "What's new" page after an update, covering every release since the version you were on. Never on a fresh install, never twice for the same version.
codebrain.atlassian.jiraUrl "" Jira base URL, e.g. https://jira.example.com. Tokens are stored in the OS keychain, never here.
codebrain.atlassian.confluenceUrl "" Confluence (Collab) base URL including its context path, e.g. https://site.atlassian.net/wiki.
codebrain.atlassian.username "" Atlassian account email. Cloud only — Server/Data Center tokens need no username.
codebrain.atlassian.maxResults 10 Default number of issues, pages, or comments per search (max 50).
codebrain.atlassian.maxBodyCharacters 12000 Max characters of a page body or issue description per tool call; longer content is truncated with a visible note.
codebrain.atlassian.allowWrite false Let agents change Jira and Confluence — comment, transition, assign, and create/update pages. While off, those tools are not offered to any agent.
codebrain.atlassian.maxImageBytes 4194304 Largest single attached image returned inline by the image tools. Bigger ones are named and skipped.
codebrain.atlassian.sslVerify true Verify the TLS certificate of the Jira/Confluence hosts. Disable only for a private certificate authority.
codebrain.jira.defaultProject "" Jira project keys the board starts filtered to, e.g. TPLD, WEB.
codebrain.jira.maxIssues 100 How many issues one board load fetches (10–500). The board says so when Jira had more.
codebrain.jira.autoRefreshMinutes 10 Minutes between automatic board reloads, only while the window has focus. 0 disables it.
codebrain.jira.dueSoonDays 3 An open issue due within this many days is flagged as due soon.
codebrain.jira.staleDays 5 An in-progress issue with no update for this long is flagged as stale.
codebrain.jira.branchTemplate {prefix}/{key}-{summary} Suggested branch name. Placeholders: {key}, {summary}, {prefix}, {type}.
codebrain.jira.baseBranch "" Branch a new issue branch is created from. Empty branches off whatever is checked out.
codebrain.jira.jql "" Advanced: JQL replacing every generated condition. Ordering is appended unless yours has ORDER BY.
codebrain.jira.statusBar true Show the current branch's issue key and status in the status bar.

📋 Extension Commands

  • CodeBrain: Initialize Workspace — Index the workspace.
  • CodeBrain: Refresh Index — Force index update.
  • CodeBrain: Rebuild Index — Full rebuild, for a partial or outdated index.
  • CodeBrain: Show Index Status — Open the index status and coverage panel.
  • CodeBrain: Choose Project — Pin which indexed project to analyze (monorepos).
  • CodeBrain: Run Affected Tests — Run the tests affected by your changes.
  • CodeBrain: Analyze Change Impact — Check the change impact.
  • CodeBrain: Review Changes — Run an independent AI review using Git diff and CodeGraph context, then publish inline diagnostics and a temporary Markdown report.
  • CodeBrain: Choose AI Model — Select the model used by CodeBrain-owned AI commands.
  • CodeBrain: Open Workflow Graph — Open the interactive visual graph.
  • CodeBrain: Token Savings Dashboard — Open the savings metrics UI.
  • CodeBrain: Reset Token Savings — Clear metrics history.
  • CodeBrain: Export Executive ROI Report — Export the workspace's measured savings and estimated hours as HTML, Markdown, or JSON.
  • CodeBrain: Restore Dismissed Review Findings — Bring back dismissed findings.
  • CodeBrain: Export Latest Report as Markdown — Export findings.
  • CodeBrain: Atlassian (Jira + Confluence) — Enter the base URLs and personal access tokens the first time; afterwards edit, test, or clear the connection.
  • CodeBrain: Generate Commit Message — Write a commit message for the staged changes into the Source Control input box.
  • CodeBrain: Choose Commit Message Format — Pick the commit message style, or switch to a custom template.
  • CodeBrain: Customize Commit Message Template — Create and open the repository's commit message template.
  • CodeBrain: Update CodeGraph Runtime — Check npm for a newer runtime now and switch to it.
  • CodeBrain: Set Up Agents — One step for Claude Code, Codex CLI, Gemini CLI, Antigravity, GitHub Copilot CLI, Cursor, and opencode: the code graph MCP server, the skills, the subagents, and — when Atlassian is configured — the Jira/Confluence server and Claude Code's ticket hook, globally or for this workspace.
  • CodeBrain: Remove from Agents — Remove all of it again, at every scope.
  • CodeBrain: Open Jira Board — Open the full board, with charts, in an editor tab.
  • CodeBrain: Check Out Branch for a Jira Issue — Pick a ticket and switch to, track, or create its branch.
  • CodeBrain: Open the Jira Issue for This Branch — Open the ticket the current branch name refers to.

⚠️ Requirements & Limitations

  • VS Code Version: ^1.100.0 or newer.
  • Trusted Workspace: CodeBrain runs a local runtime and reads local workspace files; it requires workspace trust to be enabled.
  • Network on first start: The CodeGraph runtime is downloaded from npm (or your codebrain.runtime.registry mirror) the first time, and on updates. Use codebrain.runtime.path on machines with no registry access.
  • Filesystem Workspace: Virtual workspaces are not supported.
  • Chat Models: Chat commands (/explain, /implement, /fix, /review, /test, /pr) require an active model available through VS Code Chat. CodeBrain: Review Changes requires a model available through the VS Code Language Model API and uses codebrain.ai.model when configured. Deterministic local commands (e.g. Impact scoring, Workflow Graph, Index status, export) work offline without a chat model.

🛠️ Troubleshooting

  • Workspace Index Missing: Make sure you have run CodeBrain: Initialize Workspace first.
  • Index Not Updating: Check if codebrain.autoRefresh.enabled is true. You can also trigger a manual refresh using CodeBrain: Refresh Index. CodeBrain skips the refresh before an analysis when nothing in the workspace has changed since the last one.
  • Impact Results Look Too Small: Open CodeBrain: Show Index Status and check the coverage gaps section — files in an unsupported language are absent from the graph. Also check whether the report says the traversal was truncated; if so, raise codebrain.impact.maxDepth.
  • A Finding Is Wrong: Dismiss it from the lightbulb menu. It stays hidden in future reviews; CodeBrain: Restore Dismissed Review Findings undoes this.
  • No Affected Tests Detected: Make sure tests follow standard patterns (e.g., in a tests/ directory or ending in .test.* / .spec.*) and that CodeBrain can resolve dependencies between the test files and the target source code.
  • No Language Model Available: Sign in to or enable a VS Code Language Model provider before running CodeBrain: Review Changes. Use CodeBrain: Choose AI Model to select an available model.
  • Configured Model Unavailable: Clear codebrain.ai.model or replace it with the model id shown by CodeBrain: Choose AI Model.
  • No Inline Findings: Inline diagnostics require the model to emit file/line finding markers; the full Markdown review is still available in the temporary preview report.
  • Runtime Install Failed: The error names the cause (no network, registry refused, checksum mismatch). Pick Retry, or open the settings from the notification: behind a corporate proxy or mirror, set codebrain.runtime.registry (or configure npm's own .npmrc); on an offline machine, unpack @xuansang2770/codegraph-<platform> and set codebrain.runtime.path. Every step is logged in the CodeBrain output channel.
  • Stuck on an Old Runtime: Run CodeBrain: Update CodeGraph Runtime. If codebrain.runtime.version pins a version, or codebrain.runtime.path is set, CodeBrain does not update on its own.
  • "Permission Denied" Running the Runtime (Linux/macOS): You should never have to chmod anything by hand — CodeBrain checks the runtime at startup and restores the execute bit if something dropped it, noting the repair in the CodeBrain output channel. The automatic repair only fails when the runtime folder is read-only or owned by another user, and the error message then names the exact chmod +x command to run.
  • WASM Fallback Warning: If you see a warning that CodeBrain is using WASM fallback, the runtime has no native kernel for your platform (or a codebrain.runtime.path build was made without one). The extension still works, without the performance acceleration of the native Rust kernel.
  • Atlassian Tools Missing in Copilot: The Atlassian server only appears once a product is fully configured — both a base URL and a token. Run CodeBrain: Atlassian (Jira + Confluence), then choose Test connection.
  • CodeBrain Tools Missing in Claude Code / Codex / Gemini / Antigravity / Copilot CLI / Cursor / opencode: Run CodeBrain: Set Up Agents and restart the agent — MCP servers are only read at startup. A workspace-scoped registration only applies to that folder — register globally if you want it everywhere.
  • Atlassian Tools Missing in Claude Code / Codex / Gemini / Antigravity: Configure Atlassian, run CodeBrain: Set Up Agents again, and restart the agent. The same project-scope note applies to Claude Code.
  • Atlassian Token Rejected (401): Server/Data Center tokens authenticate as a bearer token with no username; Cloud API tokens need your account email in codebrain.atlassian.username. Re-run the configure command to replace a rotated token.
  • Confluence Returns 404 for Everything: A Cloud Confluence URL must include the /wiki context path (https://site.atlassian.net/wiki).
  • Atlassian Host Behind a Private CA: Set codebrain.atlassian.sslVerify to false, or export CODEBRAIN_ATLASSIAN_SSL_VERIFY=false for agents launched outside VS Code.
  • Logs: Open VS Code Output view and select CodeBrain from the dropdown menu to inspect stdout, stderr, and execution logs. Atlassian setup and connection tests log to the CodeBrain Atlassian channel.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft