Skip to main content

VS Code Extension

The CodePeel VS Code extension brings AI-powered code review directly into your editor. It analyzes working changes, staged files, or full branch diffs before you push, posting findings as inline editor comments with one-click fixes. Reviews use the same analysis engine as GitHub PR reviews, and findings can be routed to any AI coding agent for automated resolution.


Installation

Available on the VS Code Marketplace (VS Code 1.85+). Also works with VS Code forks: Cursor, Windsurf, and other Electron-based editors.

From Marketplace

  1. Open Extensions panel (Ctrl+Shift+X / Cmd+Shift+X)
  2. Search CodePeel
  3. Click Install
  4. CodePeel icon appears in Activity Bar

From VSIX File

  1. Download .vsix from releases
  2. Command Palette → "Install from VSIX"
  3. Select downloaded file

Authentication

Sign in once with your CodePeel account. No API key required. Session persists across restarts via VS Code's secrets API.

Signing In

  1. Click CodePeel icon in Activity Bar
  2. Click Sign In
  3. Browser opens to CodePeel auth page
  4. Sign in with GitHub
  5. Browser confirms and auto-closes

Local HTTP server starts on random port for callback, shuts down immediately after token received.

Token Management

  • Tokens stored securely via VS Code secrets API
  • Auto-refreshed in the background so you stay signed in
  • Rarely need manual re-authentication

Signing Out

Click Sign Out in sidebar or run CodePeel: Sign Out from Command Palette. Removes all stored tokens.


Review Modes

Three review modes, each analyzing a different scope. All generate same findings with inline comments, diagnostics, and fix suggestions.

Working Changes (Default)

Analyzes full changes on current branch: committed changes relative to target branch + uncommitted + staged files. Equivalent to PR diff.

git diff <target>...HEAD  (committed)
git diff                   (unstaged)
git diff --cached          (staged)

Staged Changes

Analyzes only git add staged files. Ideal for pre-commit review.

git diff --cached

Branch Diff

Full diff between current branch and target branch. Prompts for target branch (defaults to codepeel.targetBranch setting).

git diff <target>...HEAD

Diff Size Limit

Diffs capped at 500 KB. Larger diffs truncated with warning. For large changesets, use staged changes mode in smaller batches.


Running a Review

  1. Open Git-tracked project with changes
  2. Click CodePeel icon in Activity Bar
  3. Select review mode from sidebar
  4. Click Review Changes or Ctrl+Shift+R / Cmd+Shift+R

Real-time progress streaming:

StageWhat Happens
SetupGit diff generated, .codepeel.yml read if present
AnalyzingDiff sent to review API, AI analysis runs
ReviewingResults processed and displayed

Findings appear in three locations:

  • Inline comments on exact lines
  • Problems panel (Ctrl+Shift+M) with severity-mapped diagnostics
  • Sidebar with per-file breakdown, finding counts, severity indicators

Configuration File Support

If .codepeel.yml exists in workspace root, extension reads and sends it with review request. Custom rules, ignored paths, security patterns, and review profile applied to IDE reviews same as GitHub PR reviews. See Configuration.


Understanding Findings

Finding Structure

FieldDescription
TitleShort description of the issue
Severitycritical, high, medium, low
Typebug, security, performance, architecture
Explanation"What's happening", "Impact", "Recommendation"
Problem codeSpecific code that triggered finding
Fix codeSuggested replacement (when available)
Why explanationEducational context on underlying principle

Severity Mapping to VS Code Diagnostics

CodePeel SeverityVS Code DiagnosticProblems Panel Icon
CriticalErrorRed circle
HighWarningYellow triangle
MediumInformationBlue circle
LowHintLightbulb

Stale Finding Detection

After review, extension monitors file changes. Modified flagged lines marked as "stale" (visually dimmed but still visible).


Applying Fixes

Every finding with fixCode can be applied directly.

Direct Application

Click Apply Suggested Fix on inline comment or Quick Fix lightbulb in Problems panel. Replaces problem code with fix, matching surrounding indentation.

Logic: find a matching range in the file by comparing the original problem code, then apply the suggested fix.

Fix with AI

Click Fix with AI on inline comment to route to your preferred AI coding agent. Extension builds structured prompt with file, line, severity, explanation, problem code, suggested fix, dispatches to configured agent.

Auto-detects installed agents. Multiple agents → quick pick menu. Single agent → used directly.

Fix All Issues

CodePeel: Fix All Issues (Command Palette) or wand icon in sidebar. Applies all available fixes sequentially with indentation adjustment.

Copy Suggestion

Click Copy Suggestion on inline comment to copy finding details and fix code to clipboard.


Fix with AI Agent Integration

Supported Agents

AgentSetting ValueHow It Works
GitHub CopilotnativeOpens Copilot Chat with fix prompt
Cursor AInativeOpens Cursor composer/chat

| Claude Code Extension | claude-code-extension | Opens panel, copies prompt | | Cline | cline | Sends via cline.addPromptToChat | | Roo Code | roo | Opens Roo panel, copies prompt | | Kilo Code | kilo-code | Sends via kilo-code.startNewTask or copies | | Augment Code | augment | Opens Augment panel, copies prompt |

| Clipboard | clipboard | Copies structured prompt to clipboard |

Auto-Detection

Default codepeel.agentType = "native" scans for installed AI agents in VS Code.

Prompt Structure

Fix the following code review finding in my codebase:

File: src/lib/auth.ts
Line: 42
Severity: high
Type: security

Issue: Hardcoded API key in source code

Explanation:
Secrets hardcoded in source code can be extracted...

Problem code:
const API_KEY = "sk-1234567890abcdef";

Suggested fix:
const API_KEY = process.env.API_KEY;

Instructions:
- Open the file src/lib/auth.ts and navigate to line 42
- Apply the suggested fix, adapting to surrounding context
- Verify the fix doesn't break existing functionality
- Only fix this specific issue, don't refactor unrelated code

Context Menu Actions

Right-click selected code → CodePeel AI submenu:

ActionDescription
Explain SelectionPlain-English explanation of selected code
Fix SelectionIdentifies bugs, generates fixes
Refactor SelectionCleanup, optimization, modernization suggestions
Generate TestsTest cases covering selected code
Ask AIFree-form question about the code

Right-click without selection → Review This File (focused review on active file).

All context menu actions send selected code + working diff to chat API. Responses in "CodePeel Chat" output channel as Markdown. Each action consumes 1 review from monthly quota.


Sidebar Interface

Webview-based panel with:

  • Review controls — trigger, stop, clear review, mode selection
  • Progress indicator — animated stage transitions
  • Findings list — grouped by file, severity badges, expand/collapse
  • Review history — past reviews with timestamps, finding counts, restore/delete
  • Account — email, plan tier, credit usage

Review History

Persisted in workspace state, survives restarts. Each entry: mode, timestamp, finding count, full findings data. Click to restore findings as inline comments. Delete unneeded reviews. Run "Fix All" on historical review.

Credit Display

Sidebar footer shows plan tier and remaining reviews. Updates automatically after each review. CodePeel: Show Credit Balance for detailed breakdown.


Settings Sync

CodePeel: Sync Review Settings → quick pick menu:

SettingDescription
Strict ModeStricter criteria, flags more issues
Security OnlyOnly security findings (skips bugs, performance, architecture)
Ignore FormattingSuppresses style/formatting issues
Custom InstructionsFree-text applied to all reviews (e.g., "Focus on React best practices")
Ignored PathsGlob patterns to exclude (e.g., dist/**, *.config.js)

Changes immediately reflected on web dashboard and vice versa. Apply to both IDE and GitHub PR reviews.


Feedback and Learning

Marking Findings

Each inline comment has feedback buttons:

  • Mark as Correct (thumbs up) — confirms finding valid, reinforces pattern
  • Mark as Incorrect (thumbs down) — flags false positive, optional explanation → dismissed, AI learns to avoid similar flags

Learning Rules

Click Learn: Never flag this on any finding → permanent suppression rule stored on server, applied to all future reviews for this repository. Can include path patterns for directory-scoped suppression.

Learned rules visible in web dashboard under Learnings section.


How It Works

  1. Diff generation — Git provider runs git diff per review mode (capped 500 KB)
  2. Configuration loading — Reads .codepeel.yml from workspace root if present
  3. API request — Diff, repo info, and config sent to the CodePeel review API
  4. Analysis — Same analysis pipeline as GitHub PR reviews: secret scanning, AI analysis, SAST, architecture review (unless securityOnly enabled)
  5. Response processing — Findings normalized, explanations structured, why-explanations from pattern library
  6. Display — Inline comments via VS Code Comment API, diagnostics in Problems panel, sidebar grouped by file
  7. Credit deduction — Each review consumes 1 review from monthly quota. Sidebar updates automatically.

Retry Logic

  • Up to 3 retries for server errors
  • Auto-retry after rate limit using Retry-After header

Settings Reference

Configure via File > Preferences > Settings → search "CodePeel" or edit settings.json.

SettingTypeDefaultDescription
codepeel.agentTypestring"native"AI agent for "Fix with AI"
codepeel.autoReviewModestring"prompt"Behavior after file save: prompt, automatic, disabled
codepeel.autoStartTaskbooleantrueAuto-start task for AI agents
codepeel.targetBranchstring"main"Default base branch for branch diff mode
codepeel.showInlineCommentsbooleantrueShow findings as inline comments

Auto-Review Modes

ValueBehavior
promptNotification asking if you want to review
automaticAutomatically triggers review after save
disabledNever auto-reviews; manual trigger only

Commands Reference

All via Command Palette (Ctrl+Shift+P):

CommandDescription
CodePeel: Review All ChangesTrigger review of all changes
CodePeel: Review Uncommitted ChangesReview only uncommitted working tree changes
CodePeel: Review Committed ChangesReview only staged changes
CodePeel: Stop ReviewCancel in-progress review
CodePeel: Clear ReviewRemove all findings from current review
CodePeel: Fix All IssuesApply all available fixes sequentially
CodePeel: Show Review SummaryDisplay walkthrough summary in panel
CodePeel: Show Credit BalanceShow current plan and remaining reviews
CodePeel: Sync Review SettingsOpen settings sync quick pick menu
CodePeel: Sign InAuthenticate with CodePeel account
CodePeel: Sign OutRemove stored authentication tokens
CodePeel: Collapse All CommentsCollapse all inline comment threads
CodePeel: Expand All CommentsExpand all inline comment threads
CodePeel: SettingsOpen extension settings

Keyboard Shortcuts

ActionShortcut
Review all changesCtrl+Shift+R / Cmd+Shift+R

Additional shortcuts configurable in File > Preferences > Keyboard Shortcuts.


Troubleshooting

"No Git repository found"

Extension requires Git repo with at least one commit:

git init && git commit --allow-empty -m "init"

If opened subfolder, open root folder instead.

"Not authenticated. Please sign in."

Session expired or tokens cleared:

  1. CodePeel: Sign Out
  2. Restart VS Code
  3. Click Sign In in sidebar

If browser flow fails (firewall blocks localhost), check no other process using the random port.

"Rate limit exceeded"

Hit per-minute rate limit (20 requests/minute across all tiers). Extension shows wait time. Resumes automatically when slot opens. See rate limits or upgrade.

"Request timed out"

For very large diffs, reviews may time out. To avoid this:

  • Use staged changes mode for smaller batches
  • Split work into smaller commits
  • Check network connection

Findings not appearing

  • Verify codepeel.showInlineComments = true
  • Ensure file is in Git diff (untracked files excluded)
  • Check Output panel → CodePeel for errors
  • File must be open in editor (inline comments only on open files)

"No changes found to review"

Git diff returned empty. Causes:

  • All changes committed, selected "Staged changes"
  • Target branch same as current branch
  • No uncommitted changes, no commits ahead of target

Extension not detecting AI agent

  1. Set codepeel.agentType explicitly in settings
  2. Ensure agent extension installed and enabled
  3. Restart VS Code after installing new agent

FAQ

Does the extension work offline? No. Requires internet for the CodePeel review API. All analysis runs on CodePeel's servers. The extension handles diff generation, auth, and display.

Works with Cursor, Windsurf? Yes. Compatible with any VS Code fork supporting Extension API 1.85+. "Fix with AI" detects Cursor's composer/chat for native integration.

How much does each IDE review cost? Each IDE review = 1 review from monthly quota (regardless of diff size). Different from GitHub PR reviews (1–5 based on diff size). See Billing.

Are code changes sent to external servers? Yes. Diff sent to the CodePeel review API. Processed by the review engine, not stored permanently after review. No code shared with third parties beyond the AI providers that power CodePeel.

Can I use extension without a GitHub account? Yes. Sign in with a GitHub account; you do not need to install the GitHub App to use the extension. The GitHub App is only needed for automatic PR reviews. The extension works with any Git repository (GitHub, GitLab, Bitbucket, Azure DevOps, self-hosted).

What languages supported? Any language in a Git diff. AI handles all major languages: TypeScript, JavaScript, Python, Go, Rust, Java, C#, Ruby, PHP, Swift, Kotlin, and more. Auto-detected from file extensions.


Related Documentation

  • Billing — Plans, review quotas, rate limits
  • Configuration.codepeel.yml reference for custom rules and review settings
  • MCP Server — Programmatic access to same review engine from any AI agent
← All docsCodePeel