Skip to main content
In this tutorial you paste one prompt into your agent. It signs in as you, connects an agent to your vault, and makes an API call that carries no key. The gateway adds the key on the way out. You finish by finding the call in Activity. You can use OneCLI Cloud, where there is nothing to install, or run OneCLI yourself.

OneCLI Cloud

1

Sign up

Create an account at onecli.sh. You get a Personal vault with one item already in it: a Test key for httpbin.org.A new account opens on Overview, with a Sign in your agent card at the top.Cloud includes 5,000 credits a month at no cost. One credit is spent each time OneCLI adds a credential to a request. Blocked requests cost nothing.
2

Sign in your agent

Signing in one agent lets it act as you in OneCLI: it adds items, sets permissions and connects other agents to vaults. Use a coding agent with a terminal, such as Claude Code, Codex or Cursor.
  1. On Overview, in the Sign in your agent card, click Copy and paste the prompt into your agent. The prompt holds no secret:
  2. The agent installs the onecli CLI if it needs to, runs onecli login, and sends you a sign-in link and a short code. Open the link, check the code and approve.
  3. The agent tells you it is signed in. It then connects a free demo sandbox, proves it with a real call, and opens your Agents page with the new agent on it. It never connects itself, so its own settings stay as they are.
The Overview page before sign-in, with the Sign in your agent card: a prompt to copy, three steps, and a status line that waits for your agent to sign in.
The card then gives way to one line, Your agent, tagged Acts as you. The Quickstart lists every command the agent runs. The signed-in agent is not connected to a vault itself.
The Overview page after sign-in: one line for your agent, tagged Acts as you, with a Connect an agent button, then totals for requests, agents, items and vaults, and a chart of requests over the last 14 days.
3

Connect more agents

An agent that calls APIs is connected to one vault. The prompt above connects your first one. For each agent after that, your signed-in agent connects it for you.
  1. Click Connect an agent, on Overview or on the Agents page.
  2. Pick the Vault, choose where the agent runs under Runs on (Boat, E2B, Daytona, Docker or Any Linux), and give it a name if you like.
  3. Click Copy and paste the prompt to your signed-in agent. It reads like this:
The Connect an agent dialog: a vault picker, Runs on tabs for Boat, E2B, Daytona, Docker and Any Linux, an optional name, and the prompt to paste to your agent.
Your agent makes a connect command that works once and for 15 minutes, and runs it where the new agent lives. If it can’t reach that place, it gives you the command to run there. The command needs only sh and curl, and looks like this:
The place it runs in becomes one named agent with its own credential. The command writes ~/.config/onecli/agent.env, which holds the agent’s proxy settings. The new agent shows up on the Agents page and on the vault’s Agents tab.To make the command yourself, without an agent, run onecli tokens create --vault Personal in a terminal where you ran onecli login.
4

Make a first call

Your agent made this call when it set things up, and told you the result. To make it yourself, go to the place where the connected agent runs and open a new shell, or load the settings into the current one:
Now call httpbin.org/bearer, which answers 401 to a request with no token. Send no credential of your own:
The request went through the gateway, and the gateway added the Test key. A 401 means your vault has no Test key. You are still connected: add an item for an API you use, as shown below, and call that instead.

What works through the gateway

curl, Python requests, Node fetch, git, npm and pip work through the OneCLI Cloud gateway. Keep three things in mind:
  • wget and Python’s urllib do not work on OneCLI Cloud. The Cloud gateway is an HTTPS proxy, and neither tool can talk to one. Use curl, requests or the address form.
  • A plain http:// call that would carry a key is refused with 403 and the error cleartext_refused. Use https://.
  • The gateway’s certificate signs every HTTPS host, including a host your vault holds no item for. The connect command sets up that trust for the agent’s tools.
5

See the call in Activity

Open your vault and go to the Activity tab. The call is listed as GET httpbin.org/bearer with the result Allowed.Activity for every vault is under Usage in the sidebar. You can filter it by result: Allowed, Blocked, Asked for approval or Rate limited.
The Activity tab under Usage: one row per request with its time, agent, vault, method, endpoint, provider and status, and filters for vault, agent, result and time.
6

Add a real item

The Test key is only a demonstration. Open your vault and click Add item, then pick a tab:
  • Connected app: sign in to an app such as GitHub or Gmail. There is no key to copy.
  • API key: paste a key, name its API host, and choose how it is sent: Bearer token, Custom header, URL parameter or URL path.
  • LLM key: add an Anthropic or OpenAI key, or sign in with a Claude or ChatGPT subscription.
The Add item dialog on the Connected app tab, with a search box and a grid of apps such as Gmail, GitHub, Notion and Linear.
Agents on the vault can use the item from their next call. A new item starts as Always allow for every tool. To make an action wait for you, or to block it, change it on the item. See How it works.An agent can also ask for an item it lacks. It runs onecli request github and shows you a link that opens the right dialog.

Self-hosted

The open-source edition runs the whole stack in Docker on your own machine.
1

Install

No Node toolchain? The install script does the same without a clone:
Setup prints the dashboard address when it finishes: http://localhost:10254 on macOS and Windows, and the Docker bridge address (usually http://172.17.0.1:10254) on Linux.
2

Create your account

Open the address and create your account.
3

Sign in your agent, connect one and make a call

Follow the Cloud steps from Sign in your agent onward. Two things differ:
  • The sign-in prompt has a second line that names your own API address, and the connect command uses that address in place of api.onecli.sh.
  • Most connected apps sign in with OAuth, and a self-hosted install needs your own OAuth app first. See App credentials.
For Docker Compose, Kubernetes, version pinning and upgrades, see Self-hosting. Before you expose an install to a network, read Hardening.

Next steps

How it works

The path of a request, vault boundaries, permissions and approvals.

Integrations

The apps you can connect, and how each one signs in.

CLI reference

onecli status, items, check, exec, attach and the rest.

Lock down an agent

Stop a Docker or Linux agent from reaching the internet around the gateway.

Troubleshooting

A connect command works once and for 15 minutes. Ask your signed-in agent for a new one, or run onecli tokens create again. Agents that are already connected stay connected.
One agent belongs to one vault. If the place is already connected to another vault, the command refuses. To move the agent, see onecli connect --replace in the CLI reference.
The item’s permission for that call is Needs approval. The gateway holds the call for up to 3 minutes. Open the bell in the dashboard to see Pending approvals and answer it. If nobody answers, the call is not sent.
On OneCLI Cloud the gateway is an HTTPS proxy, and neither tool can talk to one. wget exits with code 4, and urllib raises a URLError. Use curl, Python requests or the address form.
A plain http:// call that would carry a key is refused with the error cleartext_refused. Call the same address over https://. See Gateway errors.
Check that Docker is running and that port 10254 is free. A migrations service applies database migrations before the API starts. If it fails, the stack does not start: read docker compose logs migrations.