VibeToCode
Vibe → code, or code + vibe → code. One key.
VibeToCode is *ba-dum-tss 🥁* vibecoded, yet human reviewed. Written with AI assistance, and the author reads the source before every release. It has no runtime dependencies, no telemetry, and talks only to the endpoint you configure.
Press a key, say what you want, and the code appears in your editor. No chat panel, no Keep/Undo step. If you don't like the result, press Ctrl+Z.
How to use it
Click in the editor and press Ctrl+I (Cmd+I on Mac). A small box opens. What happens next depends on what you had selected.
| You have... |
You type... |
Result |
| Nothing selected |
what you need, e.g. json string to object |
The code (json.loads()) is inserted at your cursor |
| Code selected |
an instruction, e.g. add a docstring, simplify, use a list comprehension |
The selection is replaced with the rewritten code |
| A stub or comment selected |
nothing (leave the box empty and press Enter) |
The selection is replaced with its implementation |
Press Esc to cancel. Your last instruction is pre-filled and selected, so you can tweak it or just type over it. Inserted code is re-indented to match the code it replaces, including tab-indented files.
Two models: fast and strong
| Key |
Mac |
Model |
Use it for |
Ctrl+I |
Cmd+I |
Fast (vibetocode.model) |
Everyday edits, instant answers |
Ctrl+Shift+I |
Cmd+Shift+I |
Strong (vibetocode.strongModel) |
Harder requests that need a smarter model |
- For the fast model, a low-latency instruct or minimal-reasoning model is recommended, so replies come back almost immediately. Reasoning models work too, they are just slower.
- The strong model has its own reasoning effort (
vibetocode.strongReasoningEffort).
- Both models share the same endpoint, API key and conversation. Ask the fast model for a first version, then ask the strong model to improve it.
- The input box title shows which model you are talking to.
- If no strong model is set,
Ctrl+Shift+I tells you and offers to open the setting. It never quietly uses the fast model.
Conversation memory
Turn on vibetocode.conversationMemory (or run VibeToCode: Toggle Conversation Memory) and the model remembers your earlier requests and its own replies. Follow-ups like "now make it longer" or "add error handling" refer to what it just wrote. Memory is off by default; with it off, every request is independent.
- Context indicator. While memory is on, the status bar (bottom right) shows how full the context is, for example
12.4k / 32k · 91% cached. Click it to clear memory, set the context size, or turn memory off. It turns warning-colored from 70%. The numbers come from the token usage your server reports; if it reports none, the figure is an estimate marked ~. The cached share appears when the provider reports it.
- Full context. Set
vibetocode.memoryContextTokens to your model's context size. When the conversation would use more than 80% of it, the middle is dropped and the start and the latest edits are kept. It trims in one go to about 70%, so the start of each request stays identical (friendly to provider prompt caches) until the next trim.
- Re-selected code. If you select exactly the code the model wrote last (indentation doesn't matter), it isn't sent a second time.
- Clearing. VibeToCode: Clear Memory starts fresh. History lives in memory only and is gone when the window reloads. Only the final code is remembered, never the reasoning.
- Two models, one memory. Both models read and write the same conversation. Token counts are calibrated per model, but the context limit is one setting, so set it to the smaller of your two models' windows.
Reasoning models
Replies stream in. While a reasoning model thinks, its reasoning scrolls in the status bar (bottom right) and the code is inserted once it is written. Click the status bar item, or run VibeToCode: Show Reasoning, to read the full thinking. Click Cancel on the notification to stop. Both reasoning / reasoning_content fields and inline <think> tags are understood.
Setup
- Run VibeToCode: Set API Key from the Command Palette and paste your key. It is stored in your OS keychain, not in a settings file. Local servers on your own network don't need one.
- Set the endpoint and models in settings (search
vibetocode):
vibetocode.apiBase: defaults to OpenRouter. Also works with Ollama, llama.cpp, OpenAI and any other OpenAI-style endpoint, e.g. http://localhost:11434/v1.
vibetocode.model: your fast model.
vibetocode.strongModel: your strong model (optional).
Using a model on another machine over Tailscale
Plain http:// is normally refused for anything that is not on your own machine or private network. If your model runs on another device on your Tailscale network (for example Ollama on a home server):
- Turn on
vibetocode.allowTailscale in your settings. It is off by default.
- Set
vibetocode.apiBase to the device's Tailscale address, for example http://my-pc.tailnet-name.ts.net:11434/v1 or http://100.101.102.103:11434/v1.
Short names such as http://my-pc:11434 are not accepted. Use the full .ts.net name or the 100.x.x.x address. Like other local addresses, Tailscale devices do not need an API key.
Settings
| Setting |
Meaning |
vibetocode.apiBase |
OpenAI-style endpoint, e.g. http://localhost:11434/v1 or https://openrouter.ai/api/v1 |
vibetocode.allowTailscale |
Allow plain http:// to Tailscale devices (100.64.0.0/10 addresses and *.ts.net names). Off by default |
vibetocode.model |
Fast model, used by Ctrl+I |
vibetocode.strongModel |
Strong model, used by Ctrl+Shift+I. Same endpoint and key as the fast model |
vibetocode.reasoningEffort |
How hard the fast model thinks: minimal, low, medium, high, or any value your provider supports. Empty = model default. Quick way: VibeToCode: Set Reasoning Effort |
vibetocode.strongReasoningEffort |
Same, for the strong model only. Empty = model default (the fast model's value is not reused). Quick way: VibeToCode: Set Strong Reasoning Effort |
vibetocode.conversationMemory |
Remember earlier requests and replies (off by default) |
vibetocode.memoryContextTokens |
Your model's context size; the middle of the conversation is dropped past 80% of it (default 32000) |
vibetocode.showMemoryStatus |
Show the context indicator while memory is on (default on) |
vibetocode.showReasoning |
Show streaming reasoning in the status bar |
vibetocode.timeoutSeconds |
Give up after this long with no data from the model (default 120) |
vibetocode.temperature |
Sampling temperature; -1 omits it (some reasoning models reject it) |
vibetocode.implementMaxTokens |
Optional cap on reply length. 0 (default) = no cap; keep it 0 for reasoning models |
vibetocode.systemPrompt |
Prompt for the quick box (nothing selected) |
vibetocode.implementPrompt |
Prompt for implementing a selected stub |
vibetocode.rewritePrompt |
Prompt for rewriting a selection with your instruction |
vibetocode.copyQueryToClipboard |
Also copy what you type in the box |
Keyboard shortcuts
Ctrl+I and Ctrl+Shift+I replace VS Code's default bindings for those keys while the editor has focus. If they clash with something you use, rebind them under Keyboard Shortcuts (VibeToCode: Ask and VibeToCode: Ask (Strong Model)). On Linux, Ctrl+Shift+I is Format Document by default, so rebind either one.
Privacy and security
- Your query, or the code you have selected, is sent to the endpoint you configure and nowhere else. With a hosted provider like OpenRouter that means it leaves your machine, so don't select secrets or private code.
- No telemetry.
- The reply is inserted as text. It is never executed. Review it before running it.
- Settings are user-level only, so a project's
.vscode/settings.json cannot redirect your requests or key.
- Plain
http:// is refused for anything except localhost and private-network addresses. If you use Tailscale, turn on vibetocode.allowTailscale to also allow Tailscale devices (100.64.0.0/10 addresses and *.ts.net names). It is off by default.
- Requests time out when the model goes silent for 120 seconds (configurable).
Disclaimer
- AI output can be wrong. Review every change before you keep or run it.
- Use version control. The extension only replaces the text you selected, in a single edit you can undo with
Ctrl+Z, but it is still your job to check the result and keep backups.
- Use at your own risk. This software is provided "as is", without warranty of any kind, as described in the MIT license. The author is not liable for any loss or damage arising from its use.
- Not affiliated. VibeToCode is an independent project. It is not affiliated with or endorsed by OpenAI, OpenRouter, Ollama, or any other provider. Their names are used only to describe compatible endpoints.
Development
npm test
npx @vscode/vsce package
License
MIT
| |