Connections

Connect an AI provider once in Cua Spaces and every app that can use it works: the providers, how to connect each one, and which apps receive what.

A connection is a provider you have signed in to or given a key for: Anthropic, OpenAI, OpenRouter and the rest. Connect it once in Settings, Connections (called Connectors before) and every app that can use it works, in every Space, with nothing to set up inside the Space.

Connect a provider#

Open Settings, Connections and scroll to Providers, below Coding apps and On another computer. Each row is one provider on one line: its icon, its name, a grey line saying what is saved (for example Signed in as you@example.com (Claude Max) or API key ending 4f2a) or Not connected, and then either Connect or a check and Connected.

  • Connected: Cua has a key or sign-in for it and last saw it work.
  • Needs reconnect: the provider refused the key or sign-in, or it ran out. Press Reconnect and connect it again.
  • Not connected: press Connect.

Click a row to open its sheet. It shows when the provider was connected, the apps it works with (each opens that app's page), and Disconnect. If you have more than one key for the provider, it lists them, each with Remove, and Add another key saves a second one beside the first, with a name you pick such as Work key. The first key is the one the row shows and the one every app uses unless you tell an app otherwise (see Pick which key an app uses).

The sheet shows only the ways that apply on this computer. For Anthropic that can be your Claude sign-in (found on this computer, for Claude Code only) or an API key. For OpenAI it is an API key, or your ChatGPT sign-in for Codex. Every other provider takes an API key. Anthropic, OpenAI, OpenRouter, Google AI Studio, xAI, DeepSeek, Kimi and Custom endpoint are up front; press Show all for the rest, which you can search by name.

Saving never waits on the provider. Cua checks a key in the background and only marks it Needs reconnect when the provider says it is invalid.

From the terminal:

cua connections list
printf %s "$DEEPSEEK_API_KEY" | cua connections add deepseek
cua connections test
cua connections remove deepseek

Keys are read from standard input and are never printed. cua connect is unchanged: it still connects your coding apps to Cua.

Which apps get what#

A key goes to the apps that can use it and to no others. The sign-ins are narrower still: your Claude sign-in only ever goes to Claude Code, and your ChatGPT sign-in only to Codex. Other apps use an API key for the same provider.

AppReceives
Claude CodeAnthropic only: an API key or your Claude sign-in.
CodexOpenAI only: an API key or your ChatGPT sign-in.
Gemini CLI, AntigravityGoogle AI Studio key.
OpenCode, Goose, Pi, OpenClawThe keys of Anthropic, OpenAI, OpenRouter and (except OpenClaw) Google AI Studio, and for any other provider that serves the API they speak, its base URL and default model.
HermesAny connected provider.

A key reaches a run as an environment variable of that run only, written to a file in the run's folder that only the run can read and removed from the event log. Nothing is written to the Space image or its Volume.

Pick which key an app uses#

Claude Code and Codex read one fixed sign-in, so their page shows it. Hermes, OpenCode, Goose, Pi and OpenClaw take any provider, so their page (open it from Coding apps) has a Provider section instead. It shows the provider and the key the app runs with, for example Anthropic, API key ending 4f2a. Press Change to point the app at another provider you have connected, or at another key of the same provider. The menu lists only what that app can really read: your Claude and ChatGPT sign-ins are never in it. Connect another provider at the bottom opens the Connect sheet.

Choosing signs nothing out and deletes nothing, and it takes effect the next time the app runs. Until you choose, the app uses the first connected provider that works. If the key you chose is removed, the app does not move to another one on its own: its page says so and shows Connect, and you pick again.

Hermes#

Hermes picks a provider by its own order when it is not told which, and can borrow the sign-ins of other command line tools it finds. Cua tells it instead: each run gets a generated Hermes configuration that names the provider you chose in its Provider section (or, until you choose, the first one you connected: Anthropic, then OpenAI, OpenRouter and the rest), lists the other connected providers as fallbacks when you have not chosen one, and turns off borrowing sign-ins. If Hermes cannot reach its provider, the run fails and the thread shows the Connect card for it.

A server on your own computer#

Use Custom endpoint with the server's base URL, for example LM Studio or Ollama. A Space that is isolated from your computer cannot reach a server on it, and Cua does not change that for you: allow the port for that Space in its network settings first. The key is optional.

Providers#

The table is generated from the provider files in the Cua repository, so it is always current. Providers whose terms for third-party apps are still being checked, and providers Cua has not run end to end yet, are not listed.

ProviderHow to connectWorks with
AnthropicYour sign-in on this computer, A pasted Claude token, API keyClaude Code, OpenCode, Goose, Pi, Hermes, OpenClaw, T3 Code
OpenAIPlan sign-in, API keyCodex, OpenCode, Goose, Pi, Hermes, OpenClaw, T3 Code
OpenRouterAPI keyOpenCode, Goose, Pi, Hermes, OpenClaw
Google AI StudioAPI keyGemini CLI, Antigravity, OpenCode, Goose, Pi, Hermes
xAIAPI keyCodex, OpenCode, Goose, Pi, Hermes, OpenClaw
DeepSeekAPI keyOpenCode, Goose, Pi, Hermes, OpenClaw
Kimi (Moonshot)API keyOpenCode, Goose, Pi, Hermes, OpenClaw
GitHub CopilotAPI keyGitHub Copilot CLI
Hugging FaceAPI keyOpenCode, Goose, Pi, Hermes, OpenClaw
Z.AI (GLM)API keyOpenCode, Goose, Pi, Hermes, OpenClaw
Fireworks AIAPI keyOpenCode, Goose, Pi, Hermes, OpenClaw
NVIDIA NIMAPI keyOpenCode, Goose, Pi, Hermes, OpenClaw
Ollama CloudAPI keyHermes
DeepInfraAPI keyHermes
Novita AIAPI keyOpenCode, Goose, Pi, Hermes, OpenClaw
Nebius Token FactoryAPI keyOpenCode, Goose, Pi, Hermes, OpenClaw
GMI CloudAPI keyOpenCode, Goose, Pi, Hermes, OpenClaw
Upstage SolarAPI keyOpenCode, Goose, Pi, Hermes, OpenClaw
Arcee AIAPI keyOpenCode, Goose, Pi, Hermes, OpenClaw
Vercel AI GatewayAPI keyOpenCode, Goose, Pi, Hermes, OpenClaw
OpenCode ZenAPI keyOpenCode, Goose, Pi, Hermes, OpenClaw
OpenCode GoAPI keyOpenCode, Goose, Pi, Hermes, OpenClaw
Kilo CodeAPI keyHermes
Xiaomi MiMoAPI keyOpenCode, Goose, Pi, Hermes, OpenClaw
StepFunAPI keyOpenCode, Goose, Pi, Hermes, OpenClaw
MiniMaxAPI keyHermes
Qwen Cloud (Alibaba)API keyHermes
Custom endpointBase URL and keyOpenCode, Goose, Pi, Hermes, OpenClaw

GitHub#

An agent in a Space holds no GitHub access. When it wants to push a branch and open a pull request, it asks Cua, and Cua shows you a card with what changes: the repository, the branch, the files and the account that will be used. Nothing is sent until you press Push and open. Not now sends nothing, and the agent is told you said no. The push is made from this computer; the sign-in never goes into a Space.

Cua looks for a GitHub sign-in in this order and uses the first one it finds:

  1. A token saved in Cua. Press Paste a token on the GitHub row, or save a key named GITHUB_TOKEN under Add key.
  2. A token in the environment of the Cua daemon: GH_TOKEN or GITHUB_TOKEN for github.com, and GH_ENTERPRISE_TOKEN with GH_HOST for a GitHub Enterprise host.
  3. The GitHub CLI. If you ran gh auth login, there is nothing to paste. Cua asks gh for the token only at the moment you approve a push, keeps it in memory for that one call, and never writes it down, logs it or puts it in a card or an error. This needs gh 2.81 or later to choose between accounts.
  4. Git's own sign-in, for a repository whose remote is an SSH address (your SSH key) or when git has a credential helper. It can push a branch but it cannot open the pull request, so the card says so and you get the link.

Under Settings, Connections, GitHub there is one row per host, github.com and every GitHub Enterprise host that gh or the environment knows. A row says what is signed in in plain words: Signed in as ada with gh, Signed in as carol with a saved token, or No GitHub sign-in found: run gh auth login or paste a token. Click a row to open it:

  • Use for pushes and pull requests turns the host off. While it is off Cua uses no GitHub sign-in on that host, whatever else is set, and an agent that asks gets a plain no.
  • Account appears when gh is signed in with more than one account on the host. Choose the one Cua should use. If you choose none, it uses the account gh uses itself. If the account you chose signs out of gh, Cua does not quietly use another one: the row says so and you choose again.
  • How Cua signs in lists the four places above in order, with the one in use.
  • Rescan looks again after you ran gh auth login or changed a token. It also asks GitHub whose account a saved or environment token is and what it may do, so the row can name the account.

A sign-in needs less than people usually give it. Pushing a branch and opening a pull request only needs the repo scope. When the sign-in in use can also change workflows or administer organizations, the row shows a warning triangle and the page says what the extra access is, so you can paste a narrower token or sign in to gh again with only the scope that is needed. The card names the account only; the warning is here. Cua uses the sign-in for the approved push and pull request and for nothing else.

The same thing is available on the command line, and it never prints a token:

cua connections github
cua connections github rescan
cua connections github use bob
cua connections github use --auto
cua connections github off --host ghe.example.com

Cua can later add a fifth place, a sign-in made with a Cua GitHub App, as one more entry in this list. Nothing about the card or the rows would change.

Adding or hiding a provider#

Each provider is one small file in libs/cua/crates/cua-connections/providers. The generator turns the files into the tables the app, the CLI and this page read, and a test fails when any of them is out of date. Another test compares the provider names, variables and base URLs with the Hermes release Cua installs; providers/README.md in that folder says how to move that pin.