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

Copilot’s agent in VS Code, the Copilot CLI and the cloud agent. With Vando, your keys stay on your phone. When GitHub Copilot 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 GitHub Copilot guide, step by step

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

Set up GitHub Copilot in four steps.

  1. 1 · Install vando and connect it to your phoneIn your own terminal, not through GitHub Copilot. 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 repository root: VS Code, the Copilot CLI and the cloud agent all read it. .github/copilot-instructions.md works for Copilot only.
  3. 3 · Let vando run reach your phoneIn VS Code the terminal approval setting is chat.tools.terminal.autoApprove. The pattern below skips VS Code’s prompt for vando run; your phone still asks. Copilot checks each part of a compound command, so the program after -- must be approved too. In the Copilot CLI the flag is --allow-tool='shell(vando run)'; the CLI’s docs show only git examples, so check the form first. Neither sandbox is on by default; if you turn on VS Code’s, add Vando’s server to chat.agent.sandbox.network.allowedDomains; if you turn on the CLI’s on a Mac, the keychain is off unless sandbox.userPolicy.seatbelt.keychainAccess is true.
    "chat.tools.terminal.autoApprove": { "/^vando run\\b/": true }
  4. 4 · The MCP tools, if you want themOptional. copilot mcp add vando -- vando mcp writes ~/.copilot/mcp-config.json; VS Code’s Copilot agent reads the same file or a .mcp.json in the workspace root. VS Code’s older “Local” agent reads .vscode/mcp.json instead, with servers as the top-level key and "type": "stdio". MCP servers started by the Copilot CLI inherit only PATH.
    { "mcpServers": { "vando": { "type": "local", "command": "vando", "args": ["mcp"], "tools": ["*"] } } }

Use Vando in every project.

GitHub Copilot reads ~/.copilot/copilot-instructions.md in every project. Read by VS Code’s Copilot agent and the Copilot CLI (COPILOT_HOME moves the folder). Modular files go in ~/.copilot/instructions/**/*.instructions.md, with optional applyTo globs. In the CLI, /instructions lists them; edits need a new session. Applicable files are combined, with no precedence rule. (VS Code’s custom instructions reference and the Copilot CLI docs.)

Put this note there, so GitHub Copilot 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: Opening a pull request with your GitHub token, from VS Code.

You
Ask Copilot to open a pull request for the branch.
Copilot runs
vando run --secret GITHUB_TOKEN -- gh pr create --fill
VS Code shows
No prompt if your autoApprove pattern covers it (and gh is approved), then “Waiting for your phone”.
Your phone shows
“GitHub Copilot · MacBook wants to use GITHUB_TOKEN”. Give once; gh gets the token in its environment and opens the PR.

In the cloud, or on another computer.

The Copilot cloud agent (formerly the coding agent) runs in its own environment behind a firewall that is on by default. You can install vando in .github/workflows/copilot-setup-steps.yml and allow Vando’s server under the repository’s Copilot settings (Internet access, Custom allowlist), but the agent works unattended and each session starts clean, so a connect would need someone reading the code from the live session log. Cloud MCP tools run without asking, so the phone is the only gate. Don’t move a connection key into the agent’s secrets. Use Vando with VS Code or the Copilot CLI on a computer you sit at.

Good to know with GitHub Copilot.

Questions.

How do I stop VS Code asking before every vando run?

Add the pattern /^vando run\b/ to chat.tools.terminal.autoApprove. Copilot checks each part of a compound command, so approve the program after -- as well. Your phone still asks every time.

Where do Copilot’s MCP settings live?

copilot mcp add writes ~/.copilot/mcp-config.json, which VS Code’s Copilot agent reads too (or a .mcp.json in the workspace root). The older Local agent used .vscode/mcp.json with a different shape.

Can the Copilot cloud agent use Vando?

It can install vando in copilot-setup-steps.yml and reach Vando’s server through the custom allowlist, but it works unattended, so nobody reads the connect code. Keep Vando for VS Code and the Copilot CLI on a computer you sit at.

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 →