Connect Jev (the key never passes through you)
Jev is TypeSafe's decision model. It needs one API key. You must never see, ask for, or handle that key.
The key can come from either of two places, and the same Jev answers either way:
- TypeSafe (
jev setup-key, the default): a key from console.typesafe.ai.
- OpenRouter (
jev setup-key --provider openrouter): reaches Jev through OpenRouter's Decisions API. Worth offering when the person already has an OpenRouter key, because it is then one key instead of two and one bill instead of two.
If both keys exist, TypeSafe is used: an existing install never starts routing its decisions somewhere else because an OpenRouter key happened to be in the environment for a text model. jev doctor reports which one is in use under key.provider.
Rules
- Never ask the person to paste the key into the chat. If they paste one anyway, do not store it, do not repeat it, tell them that key should be replaced, and start the flow below.
- Never read the secret store,
.env files or ~/.config/jev/credentials to "check" the key. Use jev doctor, which reports only presence and length.
- Never put the key in a command line, a URL, a config file you write, or a log.
Flow
Check the state: jev doctor. If key.present is true and jev.reachable is true, you are done.
Start the private key page:
jev setup-key
It opens a page in the browser on the computer you are running on and prints one JSON line on stderr with a url. The URL holds no secret.
Tell the person, in one sentence, to paste their TypeSafe key into the page that just opened. If browser_opened is false, or they are talking to you from another device (Telegram, phone), send them the url and tell them it only opens on the computer the agent runs on. If they have no key yet, they create one at https://console.typesafe.ai/settings/keys.
Wait for the command to finish. It prints {"status": "stored", "verified": true, ...} when the key was saved and the provider accepted it. rejected means the key was wrong: run it again. timed_out means nobody used the page within ten minutes.
Run jev doctor once more and report the result in a sentence.
When there is no browser
Headless server over SSH: the person runs jev setup-key --tty themselves in their own terminal. It is a hidden prompt. Do not run it for them through a tool that captures the terminal.
Remote machine on a private network (Tailscale, VPN): jev setup-key --host <private-ip> --no-open and send them the link. That traffic is plain HTTP, so use it only on a network you trust end to end. Never bind a public address.
Where the key goes
The OS secret store (macOS Keychain service Hermes TypeSafe API, or secret-tool on Linux), falling back to ~/.config/jev/credentials (mode 0600). On a Hermes machine it is also written as TYPESAFE_API_KEY into ~/.hermes/.env and every profiles/*/.env, because each Hermes lane reads its own file. Running gateways pick it up on their next restart; do not restart one without being asked.
1---2name: jev-setup3description: Use when Jev is not working yet, a Jev tool reports no_key or auth_failed, or the person asks to connect or fix Jev. Gets their TypeSafe or OpenRouter key into the secret store, unseen by you.4license: MIT5---67# Connect Jev (the key never passes through you)89Jev is TypeSafe's decision model. It needs one API key. **You must never see, ask for, or handle that key.**1011The key can come from either of two places, and the same Jev answers either way:1213- **TypeSafe** (`jev setup-key`, the default): a key from [console.typesafe.ai](https://console.typesafe.ai/settings/keys).14- **OpenRouter** (`jev setup-key --provider openrouter`): reaches Jev through OpenRouter's Decisions API. Worth offering when the person already has an OpenRouter key, because it is then one key instead of two and one bill instead of two.1516If both keys exist, TypeSafe is used: an existing install never starts routing its decisions somewhere else because an OpenRouter key happened to be in the environment for a text model. `jev doctor` reports which one is in use under `key.provider`.1718## Rules1920- Never ask the person to paste the key into the chat. If they paste one anyway, do not store it, do not repeat it, tell them that key should be replaced, and start the flow below.21- Never read the secret store, `.env` files or `~/.config/jev/credentials` to "check" the key. Use `jev doctor`, which reports only presence and length.22- Never put the key in a command line, a URL, a config file you write, or a log.2324## Flow25261. Check the state: `jev doctor`. If `key.present` is true and `jev.reachable` is true, you are done.272. Start the private key page:2829 ```bash30 jev setup-key31 ```3233 It opens a page in the browser on the computer you are running on and prints one JSON line on stderr with a `url`. The URL holds no secret.343. Tell the person, in one sentence, to paste their TypeSafe key into the page that just opened. If `browser_opened` is false, or they are talking to you from another device (Telegram, phone), send them the `url` and tell them it only opens **on the computer the agent runs on**. If they have no key yet, they create one at https://console.typesafe.ai/settings/keys.354. Wait for the command to finish. It prints `{"status": "stored", "verified": true, ...}` when the key was saved and the provider accepted it. `rejected` means the key was wrong: run it again. `timed_out` means nobody used the page within ten minutes.365. Run `jev doctor` once more and report the result in a sentence.3738## When there is no browser3940Headless server over SSH: the person runs `jev setup-key --tty` **themselves** in their own terminal. It is a hidden prompt. Do not run it for them through a tool that captures the terminal.4142Remote machine on a private network (Tailscale, VPN): `jev setup-key --host <private-ip> --no-open` and send them the link. That traffic is plain HTTP, so use it only on a network you trust end to end. Never bind a public address.4344## Where the key goes4546The OS secret store (macOS Keychain service `Hermes TypeSafe API`, or `secret-tool` on Linux), falling back to `~/.config/jev/credentials` (mode 0600). On a Hermes machine it is also written as `TYPESAFE_API_KEY` into `~/.hermes/.env` and every `profiles/*/.env`, because each Hermes lane reads its own file. Running gateways pick it up on their next restart; do not restart one without being asked.