Skip to content

VS Code

Codive provides a first-class Visual Studio Code extension that brings AI-powered coding assistance directly into your editor.

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for “Codive”
  4. Click Install

Open the Codive chat panel to have conversations about your code:

  • Keyboard: Ctrl+Shift+C / Cmd+Shift+C
  • Command Palette: “Codive: Open Chat”

The chat panel shows your current file context and lets you ask questions or request changes.

Right-click on selected code or use Ctrl+. / Cmd+. to see AI-powered actions:

  • Explain Selection - Get a detailed explanation
  • Refactor Selection - AI-assisted refactoring
  • Generate Tests - Create unit tests
  • Add Documentation - Generate docstrings
  • Optimize Code - Performance suggestions

As you type, Codive suggests completions that appear as ghost text:

fn fibonacci(n: u32) -> u32 {
// Start typing, and Codive suggests:
// if n <= 1 { n } else { fibonacci(n - 1) + fibonacci(n - 2) }
}

Press Tab to accept the suggestion.

Codive adds actionable buttons above functions:

// 🤖 Explain | ✨ Refactor | 🧪 Test
pub fn process_data(input: &str) -> Result<Data, Error> {
// ...
}

When Codive detects potential issues, it provides quick fixes:

let result = dangerous_operation(); // ⚠️ Unhandled Result
// 💡 Quick fix: Add error handling

Configure the extension in VS Code settings:

  1. Open Settings (Ctrl+, / Cmd+,)
  2. Search for “Codive”
  3. Adjust settings as needed
{
// API Configuration
"codive.provider": "anthropic",
"codive.model": "claude-sonnet-4-20250514",
// Feature Toggles
"codive.inlineCompletions.enabled": true,
"codive.codeLens.enabled": true,
"codive.diagnostics.enabled": true,
// Completion Settings
"codive.inlineCompletions.triggerDelay": 500,
"codive.inlineCompletions.maxSuggestions": 3,
// Code Lens Settings
"codive.codeLens.actions": ["explain", "test", "refactor"],
// Context Settings
"codive.context.maxFiles": 50,
"codive.context.ignorePatterns": [
"node_modules/**",
"dist/**",
"*.lock"
],
// UI Settings
"codive.chat.fontSize": 14,
"codive.chat.showTokenUsage": true
}

Set your API key in VS Code settings or via environment variable:

  1. Open Settings
  2. Search for “Codive API Key”
  3. Enter your key

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

CommandDescription
Codive: Open ChatOpen the chat panel
Codive: Explain SelectionExplain selected code
Codive: Refactor SelectionRefactor selected code
Codive: Generate TestsGenerate tests for selection
Codive: Add DocumentationAdd docs to selection
Codive: Fix IssueApply AI fix for diagnostic
Codive: Toggle Inline CompletionsEnable/disable ghost text
Codive: Clear Chat HistoryClear chat panel
Codive: Show LogsView extension logs

Default keybindings (customizable in Keyboard Shortcuts):

ShortcutAction
Ctrl+Shift+C / Cmd+Shift+COpen Chat
Ctrl+Shift+E / Cmd+Shift+EExplain Selection
Ctrl+Shift+R / Cmd+Shift+RRefactor Selection
Ctrl+Shift+T / Cmd+Shift+TGenerate Tests
TabAccept inline completion
EscapeDismiss inline completion
Alt+] / Option+]Next suggestion
Alt+[ / Option+[Previous suggestion

Codive respects VS Code’s Workspace Trust feature:

  • In trusted workspaces: All features enabled
  • In restricted mode: Limited to read-only operations

Codive works with multi-root workspaces and maintains separate context for each root:

// your.code-workspace
{
"folders": [
{ "path": "frontend" },
{ "path": "backend" },
{ "path": "shared" }
],
"settings": {
"codive.context.perFolder": true
}
}
  1. Check the extension is enabled
  2. Reload VS Code (Developer: Reload Window)
  3. Check the Output panel for errors (View > Output > Codive)
  1. Check your internet connection
  2. Try a faster model:
    { "codive.model": "claude-3-haiku-20240307" }
  3. Reduce context size:
    { "codive.context.maxFiles": 20 }

Check the Output panel for detailed error messages:

  1. View > Output
  2. Select “Codive” from dropdown
  3. Look for error messages

Common issues:

  • Invalid API key
  • Rate limiting
  • Network issues

If VS Code uses too much memory:

  1. Reduce context files:
    { "codive.context.maxFiles": 30 }
  2. Disable code lens:
    { "codive.codeLens.enabled": false }

Report issues or request features: