VS Code Extension
codmir IDE integration for VS Code and compatible editors.
VS Code Extension
The codmir VS Code extension (codmir-vscode) brings AI-powered development tools directly into your editor.
Features
- AI Chat Panel - Conversational AI assistant in the sidebar
- Project Graph - Visual dependency and file relationship view
- Tasks Panel - View and manage project tickets
- @codmir Mentions - Quick AI assistance in code comments
Installation
From Marketplace
Search for "codmir" in the VS Code Extensions marketplace.
From VSIX
# Build the extension
cd infra/ide-plugin
pnpm install
pnpm build
# Install locally
code --install-extension codmir-0.0.1.vsixCommands
Access via Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
| Command | Description |
|---|---|
Codmir: Open Tasks Panel | Show project tasks in sidebar |
Codmir: Open Chat Panel | Open AI chat interface |
Codmir: Insert @codmir Mention | Add @codmir comment for AI |
Codmir: Show Project Graph | Visualize project structure |
Sidebar Views
The extension adds a "codmir" icon to the activity bar with three views:
AI Chat
Conversational interface for:
- Code explanations
- Bug fixes
- Refactoring suggestions
- Documentation generation
You: How do I fix this TypeScript error?
codmir: The error is because `data` might be undefined.
Add optional chaining:
data?.items?.map(...)
Or add a null check before accessing.Project Graph
Interactive visualization showing:
- File dependencies
- Import relationships
- Module boundaries
- Component hierarchy
Tasks
List of project tickets synced from codmir:
- Filter by status
- Quick status updates
- Create new tickets
Configuration
Settings
{
"codmir.apiUrl": "https://codmir.com/api",
"codmir.autoConnect": true,
"codmir.showNotifications": true
}Keybindings
{
"key": "ctrl+shift+c",
"command": "codmir.openCodmirChat",
"when": "editorTextFocus"
}@codmir Mentions
Add AI-powered comments in your code:
// @codmir explain this function
function complexAlgorithm(data: number[]) {
return data.reduce((a, b) => a + (b * Math.log(b)), 0);
}
// @codmir suggest improvements
async function fetchData() {
const res = await fetch('/api/data');
const json = await res.json();
return json;
}
// @codmir generate tests
export function validateEmail(email: string): boolean {
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
}Run Codmir: Insert @codmir Mention to process these comments.
Development
Building
cd infra/ide-plugin
pnpm install
pnpm buildDebugging
- Open
infra/ide-pluginin VS Code - Press
F5to launch Extension Development Host - Test the extension in the new window
Project Structure
infra/ide-plugin/
├── src/
│ ├── extension.ts # Entry point
│ ├── chat/ # Chat panel implementation
│ ├── graph/ # Project graph visualization
│ └── tasks/ # Tasks tree view
├── resources/
│ └── codmir-icon.svg # Activity bar icon
├── package.json # Extension manifest
└── tsconfig.jsonAPI Integration
The extension communicates with codmir API:
// Chat messages
POST /api/chat
{ messages: [{ role: 'user', content: '...' }] }
// Project tasks
GET /api/project/{projectId}/tickets
// File analysis
POST /api/analyze
{ filePath: '...', content: '...' }Workspace Detection
The extension auto-detects codmir workspaces:
- Looks for
.codmir/directory - Reads
codmir.jsonconfiguration - Connects to linked project
// .codmir/config.json
{
"projectId": "proj_abc123",
"organization": "my-org"
}Compatibility
Works with:
- VS Code 1.70+
- Cursor (VS Code fork)
- VSCodium
- code-server (browser)
Windsurf uses a different architecture and requires the Cluster SDK for remote development instead.
Troubleshooting
Extension Not Loading
# Check VS Code logs
code --verbose
# Clear extension cache
rm -rf ~/.vscode/extensions/codmir.*Chat Not Connecting
- Check API URL in settings
- Verify you're logged in to codmir
- Check network/firewall
Project Not Detected
Ensure .codmir/config.json exists with valid projectId.
Related
- Cluster SDK - Remote dev with VS Code Remote SSH
- Chat Client - Underlying chat API