ExplainIt
Understand any code in plain English. Right-click a selection, hover over a line, or explain an entire file — ExplainIt uses AI to break down what code does, so you don't have to be the one who wrote it.
Built for project managers, designers, data scientists, students, and anyone who reads code they didn't write.
Features
- Explain Selection — Select code, right-click, and get a clear explanation of what it does
- Explain File — Understand what an entire file does with one command
- Hover Explanations — See explanations when you hover over code (optional)
- Autocomplete Translator — Automatically explains code inserted by Copilot or other autocomplete tools (optional)
- Chat — Ask follow-up questions about any explanation in a multi-turn conversation
- Tutor Mode — Go deeper with Teach (detailed breakdown), Quiz (test your understanding), or Challenge (try it yourself)
- Learn vs Summary — "Learn" breaks down every function, parameter, and variable; "Summary" gives a quick overview
- Beginner & Intermediate — Explanations tailored to your experience level
- 7 AI Providers — Ollama (local/free), Codex CLI, OpenAI, Anthropic Claude, Google Gemini, OpenRouter, Mistral
- Smart Routing — Auto mode sends simple code to your local model and complex code to the cloud
- Bring Your Own Key — Use your own API keys. No account required, no middleman
- Smart Caching — Remembers explanations you've already seen, so you don't pay for the same request twice
Quick Start
- Install ExplainIt from the VS Code Marketplace
- Set up at least one AI provider (see below)
- Select some code, right-click, and choose "Explain This Code"
Your explanations appear in the ExplainIt sidebar panel and as a markdown document.
Provider Setup
You need at least one provider configured. Pick whichever you prefer:
| Provider |
Setup |
| Ollama (local, free) |
Install Ollama, run ollama pull qwen2.5-coder. No API key needed. |
| Codex CLI |
Install the Codex CLI and configure your OpenAI key in the CLI. |
| OpenAI |
Add your API key in Settings: explainit.openaiApiKey |
| Anthropic |
Add your API key in Settings: explainit.anthropicApiKey |
| Google Gemini |
Add your API key in Settings: explainit.googleApiKey |
| OpenRouter |
Add your API key in Settings: explainit.openrouterApiKey (one key, many providers) |
| Mistral |
Add your API key in Settings: explainit.mistralApiKey |
Tip: Set the provider to Auto (the default) and configure both Ollama and a cloud provider. ExplainIt will use the local model for simple code and the cloud for complex code — saving you money while keeping quality high.
Commands
| Command |
Description |
| ExplainIt: Explain This Code |
Explain selected code (also in right-click menu) |
| ExplainIt: What Does This File Do? |
Explain the entire active file |
| ExplainIt: Set Explanation Level |
Switch between beginner and intermediate |
Open the ExplainIt panel from the activity bar to:
- Pick your provider and model from preset lists or add your own custom models
- Browse your explanation history with timestamps and provider badges
- Chat with follow-up questions about any explanation
- Use Tutor Mode — Teach, Quiz, or Challenge buttons on each explanation card
Supported Models
Each provider comes with popular models pre-loaded:
- Ollama — qwen2.5-coder, qwen3, deepseek-r1, llama3.2, llama4:scout, codellama, gemma3, phi-4, mistral
- Codex CLI — gpt-5.4, gpt-5.4-mini, gpt-5.3-codex, gpt-4.1, codex-mini-latest
- OpenAI — gpt-5.4-mini, gpt-5.4, gpt-5.4-nano, gpt-5.3-codex, gpt-4.1, o3, o4-mini
- Anthropic — claude-sonnet-4-6, claude-opus-4-6, claude-haiku-4-5
- Google Gemini — gemini-2.5-flash, gemini-2.5-pro, gemini-3.1-pro-preview, gemini-3-flash-preview
- OpenRouter — Claude, GPT, Gemini, DeepSeek (free), Grok models
- Mistral — devstral, mistral-large, mistral-medium, codestral, magistral
Don't see your model? Add any model name using the custom model input in the sidebar.
Configuration
All settings are in VS Code Settings (Ctrl+, or Cmd+,):
| Setting |
Default |
Description |
explainit.explanationMode |
learn |
Learn (detailed breakdown) or Summary (quick overview) |
explainit.difficulty |
beginner |
Beginner (no jargon) or Intermediate |
explainit.enableHoverExplanations |
false |
Show explanations on hover |
explainit.enableAutocompleteTranslator |
false |
Auto-explain code from Copilot/autocomplete |
explainit.complexityThreshold |
40 |
Score for local vs cloud routing (0-100). Lower = more cloud. |
explainit.cacheTtlMinutes |
30 |
How long cached explanations last (minutes) |
explainit.ollamaEndpoint |
http://localhost:11434 |
Ollama server URL |
Provider, model, and API key settings are also available — see the full list under explainit.* in Settings.
Privacy
ExplainIt sends your selected code to whichever AI provider you choose. Your API keys are stored locally in VS Code settings and are never sent anywhere except directly to the provider's API. No telemetry, no analytics, no middleman servers.
License
MIT License — Copyright 2026 BodeSoftware
| |