Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>CodeMuse - AI Co-DeveloperNew to Visual Studio Code? Get it now.
CodeMuse - AI Co-Developer

CodeMuse - AI Co-Developer

sucksome

|
1 install
| (0) | Free
AI co-developer that learns your coding style and becomes your collaborator
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CodeMuse - AI Co-Developer

Your personal AI coding assistant that learns and adapts to YOUR unique coding style.

CodeMuse is a VS Code extension that observes your coding patterns, learns from them, and provides personalized AI-powered suggestions that match your style. Built with local-first privacy using SQLite for learning data and powered by Google's free-tier Gemini API.

Features

Context Menu Integration

Right-click any selected code to access:

  • Refactor Code - AI-powered refactoring that preserves your coding style
  • Explain Code - Plain-English explanations with complexity analysis
  • Suggest Improvement - Performance and readability recommendations
  • Generate Comments - Add contextual comments following your style
  • Debug This - Identify potential issues with actionable fixes
  • Search on Google - Quick browser search for selected text
  • Ask ChatGPT - Open ChatGPT with your selection

Side Panel Chat (Ctrl+Shift+C)

  • Interactive AI assistant within VS Code
  • Ask questions about your code with full file context
  • Get instant answers without leaving your editor

Adaptive Learning Mode

CodeMuse tracks (locally!) your coding patterns when Learning Mode is ON:

  • Variable naming conventions
  • Indentation preferences (tabs/spaces, size)
  • Comment density and style
  • Function length patterns
  • Problem-solving sequences

All learning data is stored locally in SQLite - nothing is sent to the cloud.

Learning Analytics Dashboard

View your coding metrics in real-time:

  • Total coding sessions and time
  • "Stuck moments" tracking (Ctrl+Shift+H when you need help)
  • Style profile breakdown
  • Most edited files
  • Export learning reports to Markdown

Smart "Get Help" Feature (Ctrl+Shift+H)

When you're stuck:

  1. Press Ctrl+Shift+H
  2. CodeMuse analyzes your current context
  3. Logs the "stuck moment" locally
  4. Provides AI-powered debugging suggestions
  5. Track your progress in resolving issues

Installation

Prerequisites

  1. VS Code version 1.80.0 or higher
  2. Node.js 18+ installed
  3. Gemini API Key (free tier available)

Get Your Gemini API Key (Free!)

  1. Visit https://makersuite.google.com/app/apikey
  2. Click "Create API Key"
  3. Copy your key

Install the Extension

Option 1: From Source (Development)

cd C:\Users\Saksham\codemuse-vscode
npm install
npm run build
code --install-extension codemuse-1.0.0.vsix

Option 2: Build and Install

npm install
npm run package
code --install-extension codemuse-1.0.0.vsix

Configure Your API Key

  1. Open VS Code Settings (Ctrl+,)
  2. Search for "CodeMuse"
  3. Enter your Gemini API key in codemuse.geminiApiKey
  4. (Optional) Choose model: gemini-1.5-flash (recommended for free tier)

Usage

Quick Start

  1. Enable Learning Mode (enabled by default)

    • Click the CodeMuse status bar item to toggle
    • When ON: "🤖 CodeMuse"
    • When OFF: "🤖 CodeMuse (Paused)"
  2. Select Code and Right-Click

    • All context menu options appear
    • Try "Explain Code" for a quick demo
  3. Open Side Panel

    • Press Ctrl+Shift+C or click CodeMuse icon in Activity Bar
    • Chat tab: Ask questions
    • Learning Analytics tab: View your stats
  4. When You're Stuck

    • Press Ctrl+Shift+H
    • Get contextual debugging help
    • CodeMuse logs it and tracks resolution

Keyboard Shortcuts

  • Ctrl+Shift+C - Open Chat Panel
  • Ctrl+Shift+H - Get Help (When Stuck)

Settings

Setting Default Description
codemuse.geminiApiKey "" Your Gemini API key
codemuse.learningMode true Enable/disable pattern tracking
codemuse.offlineMode false Work without API calls (local analysis only)
codemuse.modelName gemini-1.5-flash Gemini model to use

Offline Mode

Enable "Offline Mode" in settings to:

  • Disable all Gemini API calls
  • Continue tracking coding patterns locally
  • View analytics without AI features

Architecture

Local-First Privacy

  • SQLite Database stores all learning data in ~/.vscode/globalStorage/codemuse
  • No cloud sync - your data never leaves your machine
  • No telemetry - we don't track anything except locally

Tech Stack

  • Extension: TypeScript + VS Code API
  • AI: Google Gemini API (free tier: gemini-1.5-flash)
  • Storage: SQLite via better-sqlite3
  • Browser Integration: Node.js open package

Project Structure

codemuse-vscode/
├── src/
│   ├── extension.ts          # Main entry point
│   ├── commands/
│   │   └── index.ts           # All command handlers
│   ├── panels/
│   │   ├── ChatPanel.ts       # Chat WebView
│   │   └── AnalyticsPanel.ts  # Analytics WebView
│   └── utils/
│       ├── gemini.ts          # Gemini API wrapper
│       └── learning.ts        # SQLite learning system
├── media/
│   ├── icon.svg               # Extension icon
│   └── css/                   # WebView styles
├── package.json               # Extension manifest
├── tsconfig.json              # TypeScript config
├── esbuild.js                 # Build script
└── README.md                  # This file

Development

Build Commands

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Watch mode (development)
npm run watch

# Build for production
npm run build

# Package extension
npm run package

Testing

  1. Open project in VS Code
  2. Press F5 to launch Extension Development Host
  3. Test commands and features
  4. Check Output → CodeMuse for logs

Debugging

  • Extension Logs: Output → CodeMuse
  • WebView Logs: Right-click panel → Inspect Element → Console
  • Database: Located at %APPDATA%\Code\User\globalStorage\codemuse\codemuse-learning.db

Free-Tier Optimization

CodeMuse is designed to work efficiently within Gemini's free tier:

  1. Minimal API Calls - Only when you explicitly request AI features
  2. Prompt Optimization - Concise prompts to reduce token usage
  3. Local Analysis - Style detection happens locally without AI
  4. Batch Support - Future versions will batch requests
  5. Model Choice - Default to gemini-1.5-flash (faster + cheaper)

Free Tier Limits (as of 2024)

  • Gemini 1.5 Flash: 15 requests/minute, 1M tokens/day
  • Gemini 1.5 Pro: 2 requests/minute, 50K tokens/day

Future Enhancements

  • [ ] OpenAI/Anthropic model support
  • [ ] Embedding-based context analysis
  • [ ] Cloud sync (optional) for multi-device
  • [ ] Team style profiles
  • [ ] Inline code suggestions
  • [ ] Auto-refactor on save
  • [ ] VS Code Copilot integration

Contributing

Contributions welcome! Feel free to:

  • Report bugs via GitHub Issues
  • Submit pull requests
  • Suggest features
  • Improve documentation

Troubleshooting

Extension Not Loading

  • Check VS Code version (must be 1.80+)
  • Reload VS Code: Ctrl+Shift+P → "Reload Window"
  • Check Extension Host logs: Help → Toggle Developer Tools

API Key Issues

  • Verify key is correct in settings
  • Check key permissions at Gemini API Console
  • Try switching to gemini-pro model

SQLite Errors

  • Ensure write permissions to globalStorage folder
  • Delete codemuse-learning.db to reset (data will be lost)

Commands Not Showing

  • Check you've selected code before right-clicking
  • Reload VS Code
  • Reinstall extension

FAQ

Q: Is my code sent to Google? A: Only when you explicitly use AI features (refactor, explain, etc.). Learning/tracking happens locally.

Q: Can I use this offline? A: Yes! Enable "Offline Mode" to disable AI features but keep local tracking.

Q: Will this slow down VS Code? A: No. Learning analysis runs asynchronously with minimal performance impact.

Q: Can I export my learning data? A: Yes! Go to Learning Analytics → Export Report.

Q: Is my API key secure? A: Yes, it's stored in VS Code's secure settings. Never commit it to version control.

License

MIT License - see LICENSE file

Credits

Built with:

  • Google Generative AI
  • better-sqlite3
  • open

Made with ❤️ for developers who value their unique coding style

Support: GitHub Issues

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft