Keep OpenCode’s API keys out of .env files and chats.

The open-source terminal and desktop coding agent, version 2. With Vando, your keys stay on your phone. When OpenCode needs one, your phone shows who is asking and why, and you give it just what it asked for, for one run or a set time, or you deny it with one tap.

The OpenCode guide, step by step

Checked against OpenCode’s own documentation on 2026-11-10; the guide links its sources.

Set up OpenCode in four steps.

  1. 1 · Install vando and connect it to your phoneIn your own terminal, not through OpenCode. vando connect shows a code; open Vando on your phone, tap Connect an AI, enter it and tap Connect. The code works once, for 10 minutes.
    $ npm i -g @getvando/cli --registry=https://registry.npmjs.org --@getvando:registry=https://registry.npmjs.org
    $ vando connect
  2. 2 · Tell it how to askPut the note in AGENTS.md in the project root. OpenCode 2 reads AGENTS.md only (version 1 also fell back to CLAUDE.md).
  3. 3 · Let vando run reach your phoneOpenCode 2 allows shell commands without asking by default, and has no sandbox: commands run with your files, home folder, keychain and network. To make it ask for shell commands but let vando through (the phone is the gate), put these two rules in opencode.jsonc; the last matching rule wins.
    "permissions": [
      { "action": "shell", "resource": "*", "effect": "ask" },
      { "action": "shell", "resource": "vando *", "effect": "allow" }
    ]
  4. 4 · The MCP tools, if you want themOptional. Add the server to opencode.jsonc in the project or .opencode/, or ~/.config/opencode/opencode.jsonc for every project. In OpenCode 2 the command is one array: the program, then its arguments. The old opencode-ai package is version 1, whose config keys differ.
    {
      "$schema": "https://opencode.ai/config.json",
      "mcp": {
        "servers": {
          "vando": { "type": "local", "command": ["vando", "mcp"] }
        }
      }
    }

Use Vando in every project.

OpenCode reads ~/.config/opencode/AGENTS.md in every project. Read after the project’s files (the first matching file wins in each place); ~/.claude/CLAUDE.md is a fallback when the OpenCode file is absent, and OPENCODE_DISABLE_CLAUDE_CODE turns that fallback off. (OpenCode’s rules docs.)

Put this note there, so OpenCode gets secrets through Vando everywhere, suggests vando add in a new project, and suggests moving a project’s .env files into Vando when it finds them:

## Secrets (Vando), in every project
- Never open, print, copy or edit `.env*` files or secret values, and never put a secret in chat.
- Run anything that needs a secret as `vando run --secret NAME -- <command>` (repeat `--secret` for more than one).
- In a new project, keep secrets in Vando from the start: suggest `vando add NAME` for each one, then `vando run` to use it.
- In a project that has `.env` files with values in them, suggest `vando init`: it moves them into Vando with one Save on the owner's phone, so the values stop living in plain files that you and other tools can read.
- Exit 75 means it is waiting for the owner's phone: say "Approve NAME on your phone, then I'll run it again", do other work, then run the same command again. After two waits, stop and tell the owner to open Vando on their phone (the request is in the Inbox).
- Exit 77 means the owner said no or the access ended: don't retry; ask the owner.

An example: A dev server that gets a whole folder of secrets after vando init.

You
Run vando init once in your own terminal; your phone saves the project’s .env files as one folder per environment.
OpenCode runs
vando run -- pnpm dev
OpenCode shows
No prompt with the two permission rules above, then “Waiting for your phone”.
Your phone shows
“OpenCode · MacBook wants everything in Work › acme › dev”. Give for 8 hours; every vando run in that folder gets the dev secrets until then.

In the cloud, or on another computer.

The OpenCode 2 docs describe no hosted agent. opencode --server <url> connects to a server that runs the tools, so vando must be installed and connected on that computer.

Good to know with OpenCode.

Questions.

Why does OpenCode run vando without asking me?

OpenCode 2 allows shell commands by default. The two permissions rules above make it ask for everything except vando, and your phone asks for every secret regardless.

My opencode.jsonc keys don’t match this page. Why?

You may be on version 1 (the opencode-ai package), whose permission and MCP keys differ: the action was bash, not shell, and the command wasn’t an array. This page is for OpenCode 2.

Can OpenCode use Vando over --server?

The tools run on the server computer, so vando must be installed and connected there. OpenCode 2’s docs describe no hosted agent.

What Vando is, in short.

One app on your phone for your passwords, 2FA codes, recovery kits, files and developer secrets. Each thing gets its own lock: Easy, Just me, Two devices or Fort Knox, from a quick tap up to your fingerprint plus a security key. Your laptop and your AI tools hold no keys; when one needs a login or a key, your phone shows who is asking and for what, and you say yes or no there. Every yes is signed on your phone and kept on record.

How the locks work → · The detail for developers → · Every AI tool you can set up with Vando → · Get the app →