> ## Documentation Index
> Fetch the complete documentation index at: https://onecli.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Setting OneCLI up for your person? Follow https://onecli.sh/docs/quickstart.md. Never ask for or accept a key, token or password in the chat: OneCLI needs none.
> No OneCLI credential? Run `onecli connect`, or follow https://onecli.sh/auth.md. A person approves every new agent in their browser.
> Already connected? `onecli status`, `onecli items` and `onecli check <METHOD> <URL>` tell you what you can use. Full guide: https://onecli.sh/skill.md
> Search these docs over MCP at https://onecli.sh/docs/mcp. Report a wrong or unclear page with its `submit_feedback` tool.

# Manual Setup: Sign In Your Agent and Make a First Call

> Sign up for OneCLI Cloud or self-host, connect an agent to your vault, make a first API call with no key in it, and see the call in Activity.

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](#onecli-cloud), where there is nothing to install, or [run OneCLI yourself](#self-hosted).

## OneCLI Cloud

**1. Sign up**

Create an account at [onecli.sh](https://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:

   ```text theme={null}
   Use curl to read https://onecli.sh/docs/quickstart.md, then follow it to set up OneCLI for me.
   ```

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.](https://mintcdn.com/onecli-sh-docs/V4J4IUiL2fKJowS3/images/v3/overview-sign-in.png?fit=max\&auto=format\&n=V4J4IUiL2fKJowS3\&q=85\&s=3f0b96a656bdd32f2e2e16af2c888e7a)

The card then gives way to one line, **Your agent**, tagged **Acts as you**. The [Quickstart](https://onecli.sh/docs/quickstart.md) 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.](https://mintcdn.com/onecli-sh-docs/UKwc_-2Jl9ODV-Y7/images/v3/overview.png?fit=max\&auto=format\&n=UKwc_-2Jl9ODV-Y7\&q=85\&s=042a8642843e0ac7cb5b2bcc80234af1)

**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:

   ```text theme={null}
   Connect a new agent named "research-sandbox" to the Personal vault. It runs in a Docker container.
   ```

![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.](https://mintcdn.com/onecli-sh-docs/UKwc_-2Jl9ODV-Y7/images/v3/new-agent.png?fit=max\&auto=format\&n=UKwc_-2Jl9ODV-Y7\&q=85\&s=ca19429f6703dde96ad7329ccb6eeebb)

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:

```bash theme={null}
curl -fsSL https://api.onecli.sh/v1/install/connect | sh -s -- oc_connect_YOUR_VAULT_TOKEN
```

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:

```bash theme={null}
. ~/.config/onecli/agent.env
```

Now call `httpbin.org/bearer`, which answers `401` to a request with no token. Send no credential of your own:

```bash theme={null}
curl -s -o /dev/null -w "%{http_code}\n" https://httpbin.org/bearer
```

```text theme={null}
200
```

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](https://onecli.sh/docs/guides/address-form.md).
* A plain `http://` call that would carry a key is refused with `403` and the error [`cleartext_refused`](https://onecli.sh/docs/api-reference/gateway-errors#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.](https://mintcdn.com/onecli-sh-docs/UKwc_-2Jl9ODV-Y7/images/v3/activity.png?fit=max\&auto=format\&n=UKwc_-2Jl9ODV-Y7\&q=85\&s=aa8862bb722ff46050a33e1eb70eb084)

**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.](https://mintcdn.com/onecli-sh-docs/UKwc_-2Jl9ODV-Y7/images/v3/add-item-connected-app.png?fit=max\&auto=format\&n=UKwc_-2Jl9ODV-Y7\&q=85\&s=32d93580c3e19e89f5ba24f3b90e31d8)

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](https://onecli.sh/docs/how-it-works.md#permissions).

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**

```bash theme={null}
git clone https://github.com/onecli/onecli.git && cd onecli
pnpm install
pnpm run setup
```

No Node toolchain? The install script does the same without a clone:

```bash theme={null}
curl -fsSL https://onecli.sh/install | sh
```

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](#onecli-cloud) 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](https://onecli.sh/docs/self-hosting/app-credentials.md).

For Docker Compose, Kubernetes, version pinning and upgrades, see [Self-hosting](https://onecli.sh/docs/self-hosting/overview.md). Before you expose an install to a network, read [Hardening](https://onecli.sh/docs/self-hosting/hardening.md).

## Next steps

> [card] [How it works](https://onecli.sh/docs/how-it-works.md)
>
> The path of a request, vault boundaries, permissions and approvals.

> [card] [Integrations](https://onecli.sh/docs/integrations.md)
>
> The apps you can connect, and how each one signs in.

> [card] [CLI reference](https://onecli.sh/docs/cli/onecli-cli.md)
>
> `onecli status`, `items`, `check`, `exec`, `attach` and the rest.

> [card] [Lock down an agent](https://onecli.sh/docs/guides/agent-lockdown.md)
>
> Stop a Docker or Linux agent from reaching the internet around the gateway.

## Troubleshooting

> [accordion] The connect command is refused
>
> 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.

> [accordion] The connect command says the place already has an agent
>
> 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](https://onecli.sh/docs/cli/onecli-cli.md).

> [accordion] A call hangs, then fails
>
> 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.

> [accordion] wget or Python's urllib fails through the gateway
>
> 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](https://onecli.sh/docs/guides/address-form.md).

> [accordion] A call to an http\:// URL gets a 403
>
> 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](https://onecli.sh/docs/api-reference/gateway-errors.md#cleartext_refused).

> [accordion] The Docker stack won't start (self-hosted)
>
> 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`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.