Skip to main content

VS Code Extension

Review code before it leaves your machine. The CodePeel extension analyzes working changes, staged files, or full branch diffs and posts findings as inline editor comments with one-click fixes.


Install and Sign In

Step 1: Install from the Marketplace

  1. Open VS Code and press Ctrl+Shift+X (macOS: Cmd+Shift+X)
  2. Search for CodePeel
  3. Click Install

Step 2: Authenticate

  1. Click the CodePeel icon in the Activity Bar (left sidebar)
  2. Click Sign In in the sidebar panel
  3. Your browser opens — sign in with your CodePeel account
  4. Copy the authorization code shown in the browser
  5. Paste it into the VS Code input prompt

You need a CodePeel account first. Sign up free at codepeel.ai.


Run Your First Review

  1. Open a Git-tracked project with uncommitted changes
  2. Click the CodePeel icon in the Activity Bar
  3. In the sidebar, choose a review mode:
    • Working changes — all changes on your branch (committed + uncommitted + staged)
    • Staged changes — only git add-ed files (pre-commit workflow)
    • Branch diff — prompts you for a target branch to diff against
  4. Click Review Changes (or press Ctrl+Shift+R)

The sidebar shows progress: Setting up → Analyzing → Reviewing. When done, findings appear in three places:

  • Inline comments on the affected lines in your editor
  • Problems panel (Ctrl+Shift+M) with severity-mapped diagnostics
  • FILES section in the CodePeel sidebar with per-file finding counts
CodePeel VS Code sidebar showing review progress and file findings CodePeel inline comment in VS Code editor showing a finding with Apply Fix button

Apply a Fix

Every fixable finding includes a suggested code block. You have multiple ways to apply it:

MethodHow
Inline commentClick Apply Suggested Fix (✓ icon) on the comment thread
Fix with AIClick Fix with AI (✨ icon) to send to your AI agent
Problems panelClick the lightbulb (Quick Fix) on the diagnostic
Bulk actionRun CodePeel: Fix All Issues from the command palette

After applying, the fix is written directly into your file. Review the change, then save.

Fix with AI sends the finding to your configured AI agent (Copilot, Claude Code, Cline, Roo, etc.) for an intelligent fix. Configure which agent via codepeel.agentType in settings.


Review Staged Changes (Pre-Commit Workflow)

  1. Stage your files: git add . or stage individual files in the Source Control panel
  2. Open the CodePeel sidebar
  3. Select Staged changes as the review mode
  4. Click Review Changes

This catches issues right before you commit — no need to push first.


Review a Branch Diff

  1. Open the CodePeel sidebar
  2. Select Branch diff as the review mode
  3. Enter the target branch when prompted (default: main)
  4. Click Review Changes

To change the default target branch, update codepeel.targetBranch in your settings.


Context Menu Actions

Select any block of code in the editor, right-click, and open the CodePeel AI submenu:

VS Code context menu showing CodePeel actions like Explain, Fix, Refactor, and Generate Tests
ActionWhat it does
Explain SelectionAI-powered explanation of what the selected code does
Fix SelectionIdentifies bugs in the selection and generates fixes
Refactor SelectionSuggests cleanup, optimization, or modernization
Generate TestsCreates test cases for the selected code
Ask AIAsk a free-form question about the selected code

You can also right-click anywhere (without selection) to access Review This File — runs a focused review on only the active file.


Settings Reference

Configure via File → Preferences → Settings and search "CodePeel", or edit settings.json directly:

SettingDefaultDescription
codepeel.targetBranch"main"Branch to diff against in branch mode
codepeel.autoReviewMode"prompt"After file changes: prompt (ask), automatic (auto-run), disabled
codepeel.showInlineCommentstrueShow findings as inline editor comments
codepeel.agentType"native"AI agent for "Fix with AI" — see options below
codepeel.autoStartTasktrueAuto-start task for AI agents (vs. manual confirm)

Agent types for "Fix with AI"

The codepeel.agentType setting controls where "Fix with AI" sends the fix prompt:

ValueAgent
nativeVS Code Copilot or Cursor AI
claude-codeClaude Code (terminal)
claude-code-extensionClaude Code VS Code extension
clineCline extension
rooRoo Code extension
kilo-codeKilo Code extension
augmentAugment Code extension
codexCodex CLI (terminal)
opencodeopencode CLI (terminal)
clipboardCopies fix prompt to clipboard

Keyboard Shortcuts

ActionShortcut
Review all changesCtrl+Shift+R (macOS: Cmd+Shift+R)
Focus CodePeel sidebarCtrl+Shift+P → type "Focus on CodePeel View"

Customize these in File → Preferences → Keyboard Shortcuts.


Troubleshooting

"No Git repository found"

The extension needs Git to detect changes. Make sure your folder is a Git repo with at least one commit:

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

"Authentication failed"

Your session may have expired. Fix it:

  1. Click Sign Out at the bottom of the CodePeel sidebar
  2. Restart VS Code
  3. Click Sign In again

"Rate limit exceeded"

You've hit the hourly review cap for your plan. See rate limits for details.

Wait for the cooldown or upgrade your plan.

Findings not appearing

  • Check that codepeel.showInlineComments is true in settings
  • Ensure the file is part of the Git diff (untracked files won't show findings)
  • Open the Output panel → select CodePeel from the dropdown to see logs
← All docsCodePeel