CodeMitra – Free AI Coding Assistant
100% free. No sign up. No login. Just install and chat.
Features
- Typing suggestions – CodeMitra AI suggests inline code; Tab accepts, Escape dismisses. Toggle with CodeMitra: Toggle Typing Suggestions.
- Editor quick fixes – choose Fix with CodeMitra in chat from a diagnostic lightbulb, then review and Apply the response.
- Discuss suggestions – CodeMitra: Discuss Last Suggestion in Chat saves a conversation about your most recent generated suggestion.
- Find errors – reads VS Code problems + your files and tells you exactly which file and line is wrong.
- Fix code – suggests the fix and applies it with one click (Apply).
- Write new code – creates new files and folders for you.
- Understands your project – sees your folder tree, open file, selection. Mention other files with
@path/to/file.
- Normal chat – ask anything about programming.
- Chats are saved – open old chats from the history button.
- Screenshot analysis – attach or paste screenshots; Gemini explains the issue and replies with code.
Usage
Click the CodeMitra icon in the Activity Bar. Right-click in an editor for Explain Selection or Fix Errors in This File.
Use your own free API key (backup)
Auto mode allows 20 free request attempts per UTC day on this computer (change codemitra.freeDailyLimit). After that, or when free AI reports a credit limit or transient availability error before answering, it uses your saved key. Own Key mode skips free AI; Free mode never switches.
Credit blocks pause free requests until CodeMitra: Resume Free AI is run. Rate limits respect Retry-After before one own-key attempt. Provider refusals, access denials, missing models and invalid requests stop without switching. Partial answers are kept rather than replayed to another provider. No timeout cancels an active AI request: use Stop at any time. Waiting/source status stays visible and errors return the chat to a ready state.
Click the 🔑 key icon in the chat panel (or run CodeMitra: Add API Key) and pick:
- Google Gemini – free key at aistudio.google.com/apikey
- OpenRouter – many free models at openrouter.ai/keys
- Groq – free key at console.groq.com/keys
- SambaNova – free open-source models at cloud.sambanova.ai/apis
- Cloudflare Workers AI – free tier; paste as
ACCOUNT_ID:API_TOKEN
- OpenAI / Anthropic Claude – paid keys
Keys are stored securely on your computer only (VS Code Secret Storage) and sent directly to that provider.
Settings: codemitra.mode (auto / free / ownKey), codemitra.model (custom model name).
Screenshots
Use the paperclip button to attach an image, or paste a screenshot into chat. Add a question or send the image alone. Preview and remove attachments before sending (up to 3 PNG/JPEG/WebP images, 4 MB each).
Screenshot conversations always use your saved Google Gemini key directly, including follow-up questions, regardless of the text-chat mode. They do not go to the free CodeMitra server or other backup providers. Add a Gemini key through CodeMitra: Add API Key first. Gemini's own quotas and pricing apply. Screenshots are saved locally with chat history; delete chats to remove them. Avoid screenshots containing secrets.
Inline AI
CodeMitra uses its own AI, not the GitHub Copilot service; no GitHub login is needed. Typing suggestions share the same daily free attempt allowance and saved-key fallback as chat. A suggestion sends the nearby code and current-file diagnostics to the selected provider. Trust your workspace first; sensitive .env, .key and .pem files are excluded from inline requests. Automatic suggestions wait 800 ms after typing; stale requests are cancelled and repeated positions use cached results. Requests that take longer than 15 seconds are cancelled without blocking the editor. Chat keeps its normal Stop control. Provider quotas and costs still apply.