Core CLI
opod connect, disconnect
Print copy-paste settings that point a coding tool or SDK at your opod leader, and the steps to point it back. Neither command changes any file.
In short
opod connect CLIENT prints the settings that point a tool (Cursor, Aider, the OpenAI SDK, curl and 11 more) at your leader, with your URL, model and key filled in. opod disconnect CLIENT prints how to undo them. Both only print text: they change no file.
opod connect aider --model qwen-coder-14b# Aider → Opod (OpenAI API)
aider \
--openai-api-base http://localhost:8080/v1 \
--openai-api-key sk-orc-<your-key> \
--model openai/qwen-coder-14b
…Usage
opod connect CLIENT [--model ID] [--base-url URL] [--token KEY] [--retries N]
opod connect --list
opod disconnect CLIENT
opod disconnect --listBoth commands only print text to stdout. They change no shell profile, editor setting or config file, and they call no leader. You copy what they print into the tool.
opod connect
| Flag | Default | Effect |
|---|---|---|
--list | off | List the supported clients and exit. |
--model ID | auto | The model id written into the snippet. auto resolves, on the leader, to its default model (router.default_model). |
--base-url URL | see below | The opod base URL written into the snippet, without /v1. A trailing / is removed. |
--token KEY | see below | The API key written into the snippet. |
--retries N | 0 (off) | Ask the gateway to retry each candidate up to N times (1 to 5). Only the curl snippet carries it, as -H "X-Opod-Num-Retries: N"; the other clients have no per-request header setting, so the value is ignored for them. |
Flags may come before or after the client name. connect takes exactly one client name. From core v0.4.6, a value flag with no value (opod connect curl --retries) is a usage error, --retries needs a value, where it used to take the client name as its value; and when the key is this leader's admin key (no --token, no OPOD_TOKEN), stderr says so — give curl its own key instead: opod token create curl, then --token <that key> — because the snippet goes into another tool's config file.
The base URL is the first of:
--base-url;$OPOD_BASE_URL;external_urlinconfig.yaml;http://localhostfollowed bylisten(http://localhost:8080by default).
The key is the first of:
--token;$OPOD_TOKEN;- the admin key in
~/.opod/admin.key, written by the firstopod up.
Do not hand out the admin key
With no --token and no $OPOD_TOKEN, the snippet carries the admin key, which can call /admin/v1/*. Give each person their own user key instead:
opod token create alice
opod connect cursor --token sk-orc-<alice-key> --model qwen-coder-14bPick a client interactively
With no client name, or a name that is not in the list, on an interactive terminal, connect opens a picker (arrow keys, Enter to choose, the typed name as the starting filter). With no terminal (a pipe, CI), it prints the help to stderr and exits 2.
Example
opod connect aider --model qwen-coder-14b# Aider → Opod (OpenAI API)
aider \
--openai-api-base http://localhost:8080/v1 \
--openai-api-key sk-orc-<your-key> \
--model openai/qwen-coder-14b
# Or set permanently in ~/.aider.conf.yml:
# openai-api-base: http://localhost:8080/v1
# openai-api-key: sk-orc-<your-key>
# model: openai/qwen-coder-14bopod connect continue --base-url http://leader.example.com:8080 --model llama-3.2-3b# Continue.dev → Opod (OpenAI API)
# Add to ~/.continue/config.json under "models":
{
"title": "Opod · llama-3.2-3b",
"provider": "openai",
"model": "llama-3.2-3b",
"apiBase": "http://leader.example.com:8080/v1",
"apiKey": "sk-orc-<your-key>"
}The curl snippet prints two smoke tests: the OpenAI shape (POST /v1/chat/completions with Authorization: Bearer) and the Anthropic shape (POST /v1/messages with x-api-key and anthropic-version: 2023-06-01).
opod connect curl --retries 3 > smoke.sh && sh smoke.shErrors
| Error | Cause |
|---|---|
opod: no token available — set $OPOD_TOKEN, pass --token <key>, or run `opod up` to create one | No --token, no $OPOD_TOKEN and no ~/.opod/admin.key. |
opod: --retries must be between 1 and 5 (got 9) | --retries out of range. |
opod: connect takes exactly one client name (got: a b) | Two names. |
Clients
opod connect --list prints the same list with a one-line description of each.
| Id | Client | Wire |
|---|---|---|
cursor | Cursor | OpenAI |
aider | Aider | OpenAI |
continue | Continue (VS Code, JetBrains) | both |
zed | Zed | OpenAI |
cline | Cline / Roo Code | both |
openclaw | OpenClaw | OpenAI |
opencode | OpenCode | both |
open-webui | Open WebUI | OpenAI |
open-notebook | Open Notebook | OpenAI |
goose | goose | OpenAI |
plandex | Plandex | OpenAI |
openhands | OpenHands | both |
codex-cli | Codex CLI | OpenAI |
openai-sdk | OpenAI Python / JS SDK | OpenAI |
curl | curl | raw HTTP |
"Both" means the client can use the OpenAI shape or the Anthropic Messages shape. Opod serves /v1/messages on every chat model, so a tool that speaks Anthropic Messages points at the same base URL.
Any other OpenAI-compatible tool works without a snippet: give it the base URL with /v1 and a key.
export OPENAI_BASE_URL=http://leader.example.com:8080/v1
export OPENAI_API_KEY=sk-orc-<your-key>opod disconnect
opod disconnect aider # the unset commands for the variables connect set
opod disconnect cursor # the settings steps to clear the override
opod disconnect openai-sdk # remove base_url from code or env
opod disconnect --list# Aider takes its base URL from CLI flags or env vars.
# Reverse the Opod override:
unset OPENAI_API_BASE
unset OPENAI_API_KEY
# Then run aider with your own vendor key:
export OPENAI_API_KEY=sk-... # for OpenAI
…disconnect takes no flags other than --list, and exactly one client name. With no name it prints the help and exits 2. An unknown name prints opod: disconnect: unknown client "x" (try `opod disconnect --list`). It never opens a picker.
Afterwards the client talks to its vendor again with whatever key you give it. Nothing on the opod side changes: your keys and usage history stay on the leader, and opod connect points the client back at any time.
Last updated · Source: content/docs/core-cli/connect.mdx · View as Markdown