codmir Extension
Connect your VS Code or Windsurf IDE to Codmir AI for intelligent code assistance.
Features
- Connect to Codmir Chat - Pair your IDE with the Codmir web/mobile app
- AI-Powered Tools - Let AI read files, apply patches, run commands
- Secure by Default - All operations require confirmation by default
- Real-time Sync - Changes appear in both IDE and chat interface
Installation
From Open VSX (works today)
- Open https://open-vsx.org/extension/codmir/codmir-ide
- Click Download to get the
.vsix
- Install it in your IDE:
- VS Code: Command Palette →
Extensions: Install from VSIX...
- CLI:
code --install-extension /path/to/codmir-ide-<version>.vsix --force
From VS Code Marketplace
code --install-extension codmir.codmir-ide
If this command cannot find the extension, use the Open VSX .vsix install method above.
From Source
cd apps/vscode-extension
pnpm install
pnpm run build
pnpm run package
# Then install the generated .vsix in VS Code/Windsurf
Quick Start
Sign In (optional but recommended)
- Open Command Palette (Ctrl+Shift+P)
- Run "Codmir: Sign In"
Connect to Codmir Chat
- Go to codmir.com and open a chat
- Click "Connect IDE" button
- Copy the pairing code (e.g.,
F7KQ-2M9P)
Pair Your IDE
- Open Command Palette (Ctrl+Shift+P)
- Run "Codmir: Enter Pairing Code"
- Enter the code from step 2
Start Coding!
- Your IDE is now connected
- AI can read/write files, run commands, etc.
- Look for the Codmir status in the bottom status bar
Commands
| Command |
Description |
Codmir: Connect IDE |
Start connection flow |
Codmir: Disconnect IDE |
Disconnect from session |
Codmir: Enter Pairing Code |
Enter pairing code from web app |
Codmir: Show Status |
Show connection status |
Codmir: Sign In |
Sign in to Codmir |
Codmir: Sign Out |
Sign out |
Codmir: Open Settings |
Open extension settings |
Settings
| Setting |
Default |
Description |
codmir.serverUrl |
(from env/build target) |
Optional API URL override; leave empty to use env defaults |
codmir.webUrl |
(from env/build target) |
Optional web URL override; leave empty to use env defaults |
codmir.wsUrl |
wss://realtime.codmir.com |
WebSocket server URL |
codmir.autoConnect |
false |
Auto-connect on startup |
codmir.allowedCommands |
See below |
Commands allowed without confirmation |
codmir.askBeforeWrite |
true |
Ask before writing files |
codmir.askBeforeCommand |
true |
Ask before running commands |
codmir.showNotifications |
true |
Show notifications for tool executions |
Default Allowed Commands
npm test, pnpm test, yarn test
npm run lint, pnpm lint, yarn lint
pnpm typecheck
git status, git diff, git log
Security
The extension enforces security boundaries:
- Workspace Only - AI can only access files in your workspace
- Command Allowlist - Only whitelisted commands run without confirmation
- Blocked Commands - Dangerous commands like
rm -rf are always blocked
- Write Confirmation - File writes require your approval by default
Blocked Commands (cannot be overridden)
rm -rf
curl | bash, wget | bash
sudo rm
format c:
Status Bar
The extension shows status in the bottom status bar:
- 🔴 Disconnected - Click to connect
- 🔄 Connecting - Establishing connection
- 📡 Pairing - Waiting for pairing code
- ✅ Paired - Connected and ready
Troubleshooting
"Connection failed"
- Check your internet connection
- Ensure
codmir.serverUrl is correct
- Try signing out and back in
"Pairing code invalid"
- Codes expire after 2 minutes - generate a new one
- Codes are case-insensitive
- Dashes are optional (F7KQ2M9P = F7KQ-2M9P)
"Permission denied"
- The file may be outside your workspace
- The command may be blocked
- Check settings for allowed commands
- Some operations take time (tests, builds)
- Default timeout is 60 seconds
- Long-running commands may need different approach
Development
# Install dependencies
pnpm install
# Build
pnpm run build
# Watch mode
pnpm run dev
# Package for distribution
pnpm run package
# Install locally by environment
pnpm run install:local:testing
pnpm run install:local:staging
pnpm run install:local:production
# Uses .env.testing / .env.staging / .env.production (+ optional .env)
# Publish (auto-detects tokens from env vars or local .env files)
pnpm run publish
Publish Tokens
pnpm run publish resolves tokens in this order:
- Environment variables (CI):
VSCE_PAT, OVSX_TOKEN
apps/vscode-extension/.env
- repo
.env
apps/web/.env
Use pnpm run publish:vsce or pnpm run publish:ovsx to force a single target.
License
MIT - See LICENSE file