Intent Coder is a VS Code extension that converts small, explicit programmer intents into correct, language-specific code at the cursor — one snippet at a time. It accelerates your coding speed by matching intents against deterministic local templates first, with a fallback to a clean LLM generation if no template is found.
Features
- Line Intent → Snippet (
Enter): Type an intent (e.g.fast ioorread array) on a line and pressEnterto expand it. - Selection → Action Menu (
Ctrl+Enter): Select a block of code and pressCtrl+Enterto optimize, comment, explain, or translate it. - Template Library: Insert common algorithmic and data structure boilerplate fully offline.
- Language Switching (
Ctrl+Alt+L): Quickly swap target languages and re-resolve intents.
Commands
The extension contributes the following commands to the Command Palette:
| Command ID | Title | Keybinding |
|---|---|---|
intentCoder.resolveLine |
Intent Coder: Resolve Line | Enter (when editing) |
intentCoder.selectionMenu |
Intent Coder: Selection Actions | Ctrl+Enter (when text selected) |
intentCoder.switchLanguage |
Intent Coder: Switch Language | Ctrl+Alt+L |
intentCoder.insertTemplate |
Intent Coder: Insert Template | None (Palette only) |
intentCoder.openTemplateEditor |
Intent Coder: Edit Custom Templates | None (Palette only) |
Configuration Settings
Customize Intent Coder behavior using the following VS Code settings:
intentCoder.triggerKey: Key to resolve intent on a line (options:"enter","tab","none", default:"enter").intentCoder.llmProvider: LLM provider for fallback suggestions (options:"anthropic","openai","ollama","none", default:"anthropic").intentCoder.model: Model identifier (default:"claude-3-5-sonnet").intentCoder.maxContextLines: Surrounding lines sent to LLM for context (default:10).intentCoder.templatesPath: Path to custom template overrides (default:"").intentCoder.enableInlinePreview: Show inline ghost-text preview before committing changes (default:false).
Secure API Key Setup
API Keys are stored securely using VS Code's SecretStorage. The extension works fully in template-only mode even with no API key configured.
Offline Mode (Ollama)
Intent Coder works fully offline with no API key using Ollama.
- Install Ollama: https://ollama.com/download
- Pull a coding model:
ollama pull qwen2.5-coder:7b - In VS Code settings, set
intentCoder.llmProvidertoollama - The status bar will show
$(circuit-board) Intent Coder (local)when Ollama is running
Developer Guide
Scaffolding and Building
- Install dependencies:
npm install - Build/compile the extension:
npm run compile - Run tests in isolation:
npm run test:unit
Debugging the Extension
- Open the project in VS Code.
- Press
F5to open the Extension Development Host. - Create or open a code file (e.g.
.cppor.py) and test commands.