Coffee Code
An AI coding assistant for VS Code with a read-only Ask mode and an approval-gated
Build mode. It uses your own OpenAI API key and speaks English and Mongolian.
Preview. Coffee Code can edit files and run commands on your computer, always after
showing you what it will do. Commands are not sandboxed: they run with your permissions.
Features
- Ask mode — explore and explain code. The assistant searches and reads files, reads
compiler and linter problems and your uncommitted changes, but cannot change anything.
- Learn mode — for people learning to program. The assistant explains concepts in plain
language, defines jargon, and gives hints and small steps so you write the code yourself.
"Check my work" reviews what you changed; "Show me the solution" is there when you are stuck.
Read-only, like Ask mode.
- Build mode — the assistant makes changes as exact, reviewable edits. Each edit waits for
your approval with a diff (unless you turn on automatic approval), and files with unsaved
changes are never overwritten.
- Commands with approval — tests, builds and linters run only after you approve them, with
their output streaming into the chat. Risky commands (git push, deletes, deploys, network
access, …) need you to confirm the risk; a few catastrophic ones never run. Choose Always
allow for safe commands you run often, like
npm test.
- Checks its own work — after editing, Coffee Code asks your language servers for errors in
the changed files and lets the assistant fix them.
- Undo — revert a file or a whole task from the summary card. Undo refuses to touch a file
that changed since, so your own edits are safe.
- Context you can see — your active file and selection are included,
@ attaches more
files, and chips under each message show exactly what was sent.
- English and Mongolian interface and answers.
Getting started
Open the Coffee Code view from the activity bar.
Run Coffee Code: Set OpenAI API Key from the Command Palette.
Add the models you want to use to your settings (Coffee Code has no built-in list, because
model availability changes often):
"coffeeCode.models": ["your-model-id", { "id": "another-model-id", "label": "Fast" }]
Pick Ask, Learn or Build under the prompt box and start typing.
Settings
| Setting |
Description |
coffeeCode.models |
Model ids for the model picker (strings or { "id", "label" }). |
coffeeCode.language |
auto (follow VS Code), en or mn. |
coffeeCode.autoApproveEdits |
Apply Build-mode edits without asking. User setting only; commands always follow the rules. |
coffeeCode.gateway.url |
Optional Coffee Code gateway for usage reporting (HTTPS). User setting only. |
Always-allowed commands are listed (and can be removed) in the Coffee Code settings view.
Privacy and security
- Your API key is stored in VS Code Secret Storage (your OS keychain). It never reaches the chat
view and is sent only to OpenAI.
- Requests go directly from VS Code to OpenAI with
store: false. Coffee Code has no server of
its own and collects no telemetry.
- What the assistant sees: your prompts, your active file and selection, attached files, and
the output of the tools it uses. Secret files (
.env, private keys, credentials) and
.gitignored files are hidden from it, and known credential formats are redacted.
- Conversation history is stored locally in VS Code's workspace storage.
- Usage reporting is off unless you turn it on by setting
coffeeCode.gateway.url (user
settings only) and a gateway token. It then sends metadata per model request (provider, model,
mode, status, token counts, duration) to your organization's gateway, never prompts or code.
- In untrusted workspaces only the read-only Ask and Learn modes are available.
- Text in your files is treated as data, not instructions, but no assistant is immune to prompt
injection. Review edits and commands before approving them.
Known limitations
- OpenAI is the only provider.
- Commands run in your system shell without a sandbox (
cmd.exe on Windows).
- Undo is available until VS Code restarts.
- The automatic check depends on the language servers you have installed.
- Binary and non-UTF-8 files cannot be read or edited, and files cannot be deleted or renamed by
the assistant.
| |