An intelligent AI coding assistant powered by Sarvam AI, built into VS Code.
Get instant completions, smart debugging, code explanations, and conversational AI — without leaving your editor.
🌐 Website | 🐛 Report a Bug | 💡 Feature Request | 💬 Discussions
- ✨ Features
- 🚀 Getting Started
- 🎯 Commands Reference
- ⌨️ Keyboard Shortcuts
- ⚙️ Configuration
- 🛠️ Development Setup
- 🗺️ Roadmap
- 🐛 Reporting a Bug
- 📄 License
| Feature | Description |
|---|---|
| 💬 AI Chat Sidebar | Ask anything about your code, get instant answers with full file context |
| ⚡ Inline Completions | Real-time code suggestions as you type (conservative / balanced / creative modes) |
| 🔧 Fix with AI | Select broken code, get an improved version shown as a diff |
| 🔐 Secure Key Storage | API key encrypted via VS Code's built-in secret storage |
| 🧠 Session Memory | Tracks bugs, features, goals, and notes across your coding session |
| 🧪 Test Generation | Auto-generate test cases for any file or selection |
| 🔒 Security Scanning | Detect vulnerabilities in a file or across the whole project |
| 📄 Docs Generation | Generate README, JSDoc, Swagger, and full API docs instantly |
| 🎤 Voice Commands | Control Sarvis hands-free with voice input |
| 🔀 Git Intelligence | Commit messages, diff reviews, PR creation, and risk detection |
Option A — Install from VSIX:
Extensions panel (Ctrl+Shift+X) → ••• Menu → Install from VSIX → select sarvis-1.0.0.vsix
Option B — Install from Marketplace:
Extensions panel → Search "Sarvis" → Install
Open the Command Palette and run:
Ctrl+Shift+P → "Sarvis: Set API Key"
Or click the ⚙ gear icon in the Sarvis sidebar panel.
🔑 Get your free API key at sarvam.ai
Click the S icon in the VS Code Activity Bar to open the Sarvis chat panel. Start asking questions about your code!
All commands are accessible via the Command Palette (Ctrl+Shift+P) by typing Sarvis:.
Many are also available in the right-click context menu in the editor and terminal.
Shortcut: Ctrl+Shift+E / Cmd+Shift+E
When: Text selected in editor
Select any block of code, run this command, and Sarvis will explain what it does, line by line.
Example:
1. Select a complex function
2. Right-click → Sarvis: Explain Selected Code
3. Sarvis opens a panel with a plain-English breakdown
Shortcut: Ctrl+Shift+G / Cmd+Shift+G
When: Editor is focused
Describe what you want to build in natural language and Sarvis generates the code inline.
Example prompt:
"Create a debounce function that accepts a callback and delay in milliseconds"
→ Sarvis inserts a ready-to-use debounce implementation at your cursor
Shortcut: Ctrl+Shift+D / Cmd+Shift+D
When: Error text selected in editor
Select an error message or a broken code block and Sarvis diagnoses the issue and suggests a fix.
Example:
1. Select: TypeError: Cannot read properties of undefined (reading 'map')
2. Run Sarvis: Debug Error
3. Sarvis explains the root cause and shows a corrected code snippet
Shortcut: Ctrl+K Ctrl+E / Cmd+K Cmd+E
When: Editor focused
Opens an inline prompt bar. Describe how you want to change the current file and Sarvis edits it directly.
Example prompt: "Refactor all callbacks to use async/await"
→ Sarvis rewrites the file in place with a diff preview
Shortcut: Ctrl+Shift+Space / Cmd+Shift+Space
When: Text selected in editor
Activates a live back-and-forth pair programming session around the selected code.
Shortcut: Ctrl+Shift+A / Cmd+Shift+A
Ask a natural language question about your entire indexed codebase.
Example: "Where is the authentication middleware defined?"
→ Sarvis searches the index and points you to the exact file and line
Shortcut: Ctrl+Shift+I / Cmd+Shift+I
Indexes your project so Sarvis can answer questions about the full codebase. Run this once when you open a new project.
Shortcut: Ctrl+Shift+Alt+C / Cmd+Shift+Alt+C
Also in: Source Control panel title bar
Analyzes your staged changes and auto-generates a conventional commit message.
Example output:
feat(auth): add JWT refresh token rotation
- Implement token rotation on every refresh
- Store refresh token hash in DB instead of plaintext
- Add 7-day expiry policy
Shortcut: Ctrl+Shift+Alt+S / Cmd+Shift+Alt+S
Produces a human-readable summary of all current git changes — useful for standups or PR descriptions.
Shortcut: Ctrl+Shift+Alt+R / Cmd+Shift+Alt+R
Also in: Source Control panel title bar
Reviews the current diff for logic issues, code quality, and potential bugs.
Shortcut: Ctrl+Shift+Alt+K / Cmd+Shift+Alt+K
Also in: Source Control panel title bar
Scans the diff and flags changes that might break existing functionality or introduce regressions.
Example output:
⚠️ HIGH RISK: Removed null check on user.id in /src/routes/profile.js:42
⚠️ MEDIUM RISK: Changed default export signature in /lib/api.js
Shortcut: Ctrl+Shift+Alt+P / Cmd+Shift+Alt+P
Generates a complete pull request description (title, summary, changes, testing notes) from your current branch diff.
Fetches an open PR and performs a thorough review, highlighting issues, suggestions, and potential problems.
Shortcut: Ctrl+Shift+Alt+L / Cmd+Shift+Alt+L
Generates a structured changelog from your recent git commits, formatted for CHANGELOG.md.
Shortcut: Ctrl+Shift+Alt+V / Cmd+Shift+Alt+V
Performs a comprehensive review of the current file — logic, style, best practices, and potential bugs.
Available in the Problems panel (lightbulb / quick fix). Fixes a specific diagnostic error flagged by VS Code.
Shortcut: Ctrl+Shift+Alt+H / Cmd+Shift+Alt+H
Scans all VS Code diagnostics in the current file and attempts to fix every problem at once.
Shortcut: Ctrl+Shift+Alt+Y / Cmd+Shift+Alt+Y
Runs an AI-powered fix pass across every file in the workspace that has diagnostics.
Shortcut: Ctrl+Shift+Alt+G / Cmd+Shift+Alt+G
Traces an error back to its root cause by analyzing the call stack, related files, and recent changes.
Shortcut: Ctrl+Shift+Alt+O / Cmd+Shift+Alt+O
Identifies anti-patterns, dead branches, overly complex logic, and other code smells in the current file.
Shortcut: Ctrl+Shift+Alt+E / Cmd+Shift+Alt+E
Runs code smell detection across the entire project and produces a consolidated report.
Shortcut: Ctrl+Shift+Alt+1 / Cmd+Shift+Alt+1
Identifies unreachable or unused code within the current file.
Shortcut: Ctrl+Shift+Alt+2 / Cmd+Shift+Alt+2
Scans the entire project for dead code — unused functions, variables, exports, and imports.
Shortcut: Ctrl+K Ctrl+C / Cmd+K Cmd+C
Generates a visual complexity map of the current file, highlighting the most complex functions by cyclomatic complexity.
Shortcut: Ctrl+Shift+Alt+3 / Cmd+Shift+Alt+3
Analyzes your project's dependency graph, identifying circular dependencies, unused packages, and version conflicts.
Shortcut: Ctrl+Shift+Alt+H / Cmd+Shift+Alt+H
Opens an at-a-glance health dashboard for your workspace: errors, warnings, test coverage, complexity, and TODOs.
Shortcut: Ctrl+Shift+Alt+M / Cmd+Shift+Alt+M
Analyzes your project structure and generates a comprehensive README.md.
Example output includes:
- Project title and description
- Installation instructions
- Usage examples
- API reference (if applicable)
- Contributing guidelines
Shortcut: Ctrl+Shift+Alt+J / Cmd+Shift+Alt+J
Automatically adds JSDoc comments to all functions, classes, and exports in the current file.
// Before
function calculateTax(price, rate) {
return price * rate;
}
// After — Sarvis adds:
/**
* Calculates the tax amount for a given price and rate.
* @param {number} price - The base price before tax.
* @param {number} rate - The tax rate as a decimal (e.g., 0.08 for 8%).
* @returns {number} The calculated tax amount.
*/
function calculateTax(price, rate) {
return price * rate;
}Shortcut: Ctrl+Shift+Alt+W / Cmd+Shift+Alt+W
Parses your Express/Fastify/NestJS routes and generates OpenAPI 3.0 (Swagger) documentation.
Shortcut: Ctrl+Shift+Alt+D / Cmd+Shift+Alt+D
Creates developer-friendly API documentation from your route handlers, including request/response shapes and examples.
Shortcut: Ctrl+Shift+Alt+B / Cmd+Shift+Alt+B
Refactors the current file: cleans up structure, applies consistent patterns, and removes redundancy — with a diff preview.
Shortcut: Ctrl+Shift+Alt+Q / Cmd+Shift+Alt+Q
Performs a project-wide refactor pass. Useful for renaming patterns, updating APIs, or enforcing a new convention.
Shortcut: Ctrl+K Ctrl+M / Cmd+K Cmd+M
Migrates code to a different version, framework, or language.
Example prompts:
- "Migrate this from JavaScript to TypeScript"
- "Convert class components to React functional components with hooks"
- "Upgrade from Express 4 to Express 5 syntax"
Shortcut: Ctrl+Shift+U / Cmd+Shift+U
Generates comprehensive unit tests for the current file, covering happy paths, edge cases, and error cases.
// Sarvis generates tests for your function using your project's existing test framework:
describe('calculateTax', () => {
it('should calculate tax correctly', () => {
expect(calculateTax(100, 0.08)).toBe(8);
});
it('should return 0 for zero rate', () => {
expect(calculateTax(100, 0)).toBe(0);
});
it('should handle negative prices', () => {
expect(calculateTax(-50, 0.1)).toBe(-5);
});
});Shortcut: Ctrl+Shift+Alt+T / Cmd+Shift+Alt+T
Runs the test suite for the current project and displays results in the Sarvis panel.
Shortcut: Ctrl+Shift+Alt+F / Cmd+Shift+Alt+F
Runs the test suite and automatically attempts to fix any failing tests using AI.
Shortcut: Ctrl+Shift+Alt+S / Cmd+Shift+Alt+S
Scans the current file for security vulnerabilities: SQL injection, XSS, hardcoded secrets, insecure dependencies, etc.
Example output:
🔴 CRITICAL Line 23: Possible SQL injection — user input concatenated into query
🟡 WARNING Line 47: Hardcoded API key detected
🟡 WARNING Line 89: eval() usage — potential code injection risk
Shortcut: Ctrl+Shift+Alt+X / Cmd+Shift+Alt+X
Runs a comprehensive security audit across all project files and exports a report.
Shortcut: Ctrl+Shift+Alt+8 / Cmd+Shift+Alt+8
Identifies performance bottlenecks in the current file: expensive loops, synchronous blocking calls, memory leaks, etc.
Shortcut: Ctrl+Shift+Alt+9 / Cmd+Shift+Alt+9
Runs performance analysis across the entire project.
Sarvis maintains a session memory so it stays aware of what you're working on throughout your coding session.
Shortcut: Ctrl+Shift+Alt+5 / Cmd+Shift+Alt+5
Tell Sarvis what bug you're currently investigating. It will keep this context across all subsequent commands.
Example: "Users are getting logged out randomly after about 10 minutes"
Shortcut: Ctrl+Shift+Alt+6 / Cmd+Shift+Alt+6
Set the feature you're currently building so Sarvis can give more relevant suggestions.
Example: "Implementing OAuth2 with GitHub as a provider"
Define the high-level goal of your project for richer context in all AI responses.
Shortcut: Ctrl+Shift+Alt+7 / Cmd+Shift+Alt+7
Add a freeform note to session memory.
Example: "The DB uses soft deletes — never hard-delete records"
Shortcut: Ctrl+Shift+Alt+4 / Cmd+Shift+Alt+4
Opens a panel showing everything Sarvis currently knows about your session context.
Resets all session memory (bug, feature, goal, notes).
Shortcut: Ctrl+K Ctrl+D / Cmd+K Cmd+D
Analyzes your project structure and generates a visual architecture diagram (rendered as Mermaid or SVG).
Example output — a Mermaid diagram:
graph TD
A[Client] --> B[API Gateway]
B --> C[Auth Service]
B --> D[User Service]
D --> E[(PostgreSQL)]
Shortcut: Ctrl+Shift+Alt+Z / Cmd+Shift+Alt+Z
Suggests an architecture for a new feature or system based on your project context.
Annotate a section of code with a high-level architecture note that persists in session memory.
Shortcut: Ctrl+Shift+Alt+0 / Cmd+Shift+Alt+0
Collects all TODO, FIXME, HACK, and NOTE comments across the project and presents them in a prioritized list.
Shortcut: Ctrl+Shift+Alt+\`` / Cmd+Shift+Alt+``
Same as above, scoped to the current file only.
Shortcut: Ctrl+Shift+Alt+= / Cmd+Shift+Alt+=
Generates a daily standup summary based on your recent git commits and session memory.
Example output:
✅ Yesterday: Implemented JWT refresh rotation, fixed null-check bug in profile route
🔨 Today: Starting OAuth2 GitHub integration
🚧 Blockers: Need access to staging DB credentials
Shortcut: Ctrl+Shift+Alt+J / Cmd+Shift+Alt+J
Inserts a context-aware code snippet at your cursor based on surrounding code and your session context.
Define your own snippet shortcuts. Type a trigger word and Sarvis expands it into full code.
Example: Trigger "apiroute" → Sarvis inserts your standard Express route boilerplate
Shortcut: Ctrl+Shift+Alt+T / Cmd+Shift+Alt+T
Opens a library of pre-built prompt templates for common tasks (review, refactor, document, etc.).
Shortcut: Ctrl+Shift+Alt+N / Cmd+Shift+Alt+N
Sarvis analyzes the current file and updates your coding profile with patterns, libraries, and conventions you use.
Shortcut: Ctrl+Shift+Alt+L / Cmd+Shift+Alt+L
Displays your personalized coding profile: preferred languages, frameworks, patterns, and skill areas.
Shortcut: Ctrl+Shift+Alt+I / Cmd+Shift+Alt+I
Starts an interactive coding interview practice session tailored to your skill profile.
Shortcut: Ctrl+Shift+Alt+V / Cmd+Shift+Alt+V
Activates voice input — speak your command or code request and Sarvis executes it.
Toggles AI-powered hover explanations for VS Code diagnostic errors. When enabled, hovering over a red underline shows a plain-English explanation and suggested fix.
Toggles automatic code review every time you save a file.
Shortcut: Ctrl+Shift+X / Cmd+Shift+X (when terminal is focused)
Also in: Terminal right-click menu
Describe what you want to do in plain English and Sarvis generates the shell command.
Example: "Find all .log files larger than 100MB and delete them"
→ find . -name "*.log" -size +100M -delete
Shortcut: Ctrl+Shift+F / Cmd+Shift+F (when terminal is focused)
Also in: Terminal right-click menu
Copy a terminal error, run this command, and Sarvis diagnoses the error and provides a fix.
Example terminal error:
Error: Cannot find module 'express'
→ Sarvis: Run `npm install express` — the package is missing from node_modules
| Command | Windows/Linux | macOS |
|---|---|---|
| Explain Selected Code | Ctrl+Shift+E |
Cmd+Shift+E |
| Generate Code | Ctrl+Shift+G |
Cmd+Shift+G |
| Debug Error | Ctrl+Shift+D |
Cmd+Shift+D |
| Generate Tests | Ctrl+Shift+U |
Cmd+Shift+U |
| Ask About Codebase | Ctrl+Shift+A |
Cmd+Shift+A |
| Index Codebase | Ctrl+Shift+I |
Cmd+Shift+I |
| Edit Code with Prompt | Ctrl+K Ctrl+E |
Cmd+K Cmd+E |
| Pair Programmer | Ctrl+Shift+Space |
Cmd+Shift+Space |
| Git Commit Message | Ctrl+Shift+Alt+C |
Cmd+Shift+Alt+C |
| Git Review Diff | Ctrl+Shift+Alt+R |
Cmd+Shift+Alt+R |
| Detect Risky Changes | Ctrl+Shift+Alt+K |
Cmd+Shift+Alt+K |
| Security Scan (File) | Ctrl+Shift+Alt+S |
Cmd+Shift+Alt+S |
| Security Scan (Project) | Ctrl+Shift+Alt+X |
Cmd+Shift+Alt+X |
| Refactor File | Ctrl+Shift+Alt+B |
Cmd+Shift+Alt+B |
| Generate README | Ctrl+Shift+Alt+M |
Cmd+Shift+Alt+M |
| Add JSDoc | Ctrl+Shift+Alt+J |
Cmd+Shift+Alt+J |
| Generate Swagger | Ctrl+Shift+Alt+W |
Cmd+Shift+Alt+W |
| Complexity Map | Ctrl+K Ctrl+C |
Cmd+K Cmd+C |
| Architecture Diagram | Ctrl+K Ctrl+D |
Cmd+K Cmd+D |
| Find Dead Code (File) | Ctrl+Shift+Alt+1 |
Cmd+Shift+Alt+1 |
| Find Dead Code (Project) | Ctrl+Shift+Alt+2 |
Cmd+Shift+Alt+2 |
| Analyze Dependencies | Ctrl+Shift+Alt+3 |
Cmd+Shift+Alt+3 |
| View Session Memory | Ctrl+Shift+Alt+4 |
Cmd+Shift+Alt+4 |
| Set Current Bug | Ctrl+Shift+Alt+5 |
Cmd+Shift+Alt+5 |
| Set Current Feature | Ctrl+Shift+Alt+6 |
Cmd+Shift+Alt+6 |
| Add Memory Note | Ctrl+Shift+Alt+7 |
Cmd+Shift+Alt+7 |
| Analyze Performance (File) | Ctrl+Shift+Alt+8 |
Cmd+Shift+Alt+8 |
| Analyze Performance (Project) | Ctrl+Shift+Alt+9 |
Cmd+Shift+Alt+9 |
| Scan TODOs (Project) | Ctrl+Shift+Alt+0 |
Cmd+Shift+Alt+0 |
| Run Tests | Ctrl+Shift+Alt+T |
Cmd+Shift+Alt+T |
| Run Tests + Auto-Fix | Ctrl+Shift+Alt+F |
Cmd+Shift+Alt+F |
| Health Dashboard | Ctrl+Shift+Alt+H |
Cmd+Shift+Alt+H |
| Standup Report | Ctrl+Shift+Alt+= |
Cmd+Shift+Alt+= |
| Generate Changelog | Ctrl+Shift+Alt+L |
Cmd+Shift+Alt+L |
| Create PR | Ctrl+Shift+Alt+P |
Cmd+Shift+Alt+P |
| Voice Command | Ctrl+Shift+Alt+V |
Cmd+Shift+Alt+V |
| Practice Interview | Ctrl+Shift+Alt+I |
Cmd+Shift+Alt+I |
| Fix Terminal Error | Ctrl+Shift+F (terminal) |
Cmd+Shift+F (terminal) |
| Generate Terminal Command | Ctrl+Shift+X (terminal) |
Cmd+Shift+X (terminal) |
Open VS Code Settings (Ctrl+,) and search for Sarvis to configure the following:
| Setting | Type | Default | Description |
|---|---|---|---|
sarvis.reviewOnSave |
boolean | true |
Automatically review code when saving a file |
sarvis.errorExplainer |
boolean | true |
Show AI-powered error explanations on hover |
sarvis.errorExplainerDelay |
number | 500 |
Delay (ms) before fetching error explanation on hover |
sarvis.completionMode |
string | "balanced" |
Inline completion aggressiveness: conservative, balanced, or creative |
sarvis.customSnippetTriggers |
object | {} |
Custom snippet triggers — key = trigger word, value = description |
sarvis.showBranding |
boolean | true |
Show Sarvis branding when a suggestion is accepted |
{
"sarvis.completionMode": "creative",
"sarvis.reviewOnSave": false,
"sarvis.errorExplainerDelay": 300,
"sarvis.customSnippetTriggers": {
"apiroute": "Express GET route with error handling and async/await",
"mongoose": "Mongoose schema with timestamps and validation"
}
}Want to contribute or run Sarvis locally?
# 1. Clone the repository
git clone https://github.com/Sarvium/sarvis.git
cd sarvis
# 2. Install dependencies
npm install
# 3. Build the extension
node esbuild.js
# 4. Open in VS Code
code .
# 5. Press F5 to launch the Extension Development Hostnode esbuild.js --watchsarvis/
├── src/ # TypeScript source files
├── media/ # Icons and assets
├── out/ # Compiled output (generated)
├── esbuild.js # Build configuration
└── package.json # Extension manifest
feat: New feature
fix: Bug fix
docs: Documentation changes
style: Formatting, no logic change
refactor: Code restructure
chore: Build / config changes
test: Adding or updating tests
- Multi-language support (Hindi, Tamil, Telugu via Sarvam)
- Chat history persistence across sessions
- Custom system prompt configuration
- Support for multiple AI models
- Workspace-level context awareness
- Inline diff editor for AI suggestions
- GitHub Copilot–style ghost text completions
Found something broken? We want to fix it fast.
Before reporting:
- Check open issues to avoid duplicates
- Make sure you're on the latest version
- Try reloading VS Code:
Ctrl+Shift+P→Reload Window
Please include:
VS Code Version: Help → About
Sarvis Version: Extensions panel → Sarvis
OS: Windows / macOS / Linux
What happened: Clear description of the bug
Steps to reproduce:
1. ...
2. ...
Expected behavior: What you expected
Logs: View → Output → "Extension Host"
Include: what problem it solves, how you'd like it to work, and any examples or references.
| Label | Description |
|---|---|
bug |
Something isn't working |
enhancement |
New feature request |
question |
General question |
good first issue |
Great for new contributors |
help wanted |
Extra attention needed |
wontfix |
Will not be addressed |
duplicate |
Already reported |
MIT License © 2024 Sarvium
See LICENSE for full text.
| Created by Sarvium |
Developed by Akash Kobal |
Powered by Sarvam AI |
Built with ❤️ by Sarvium · Developed by Akash Kobal
