Setup prompt
My OneCLI API is at https://onecli.example.com.
The rest of this page is written for the agent, so it also shows exactly what the agent will do. To run the steps yourself, use the Quickstart.
Instructions for the agent
You are setting up OneCLI for the person you are working with. If you are reading this page, you already have the instructions: start at Step 1. OneCLI gives an agent access to APIs without giving it a key. Your person keeps their apps and keys in a vault. Each agent connects to one vault. When an agent calls an API through the OneCLI gateway, the gateway adds the credential on the way out. You are your person’s manager. You sign in once, then connect the agent your person wants, where it runs. You never connect yourself: you hold only the key thatonecli login saves.
Follow these rules for the whole setup:
- Never run
onecli connect,onecli attach,onecli run, oronecli execfor yourself, and never add a proxy to your own settings. - Never ask your person for a key, a token, or a password. You do not need one.
onecli tokens createshows a connect token once. Pass it only to the place it is for. Never repeat it, log it, or save it.- Never print, log, or save a credential or the contents of
agent.env. Where an agent is connected, never run commands that print the environment orHTTPS_PROXY, such asenvorprintenv: they hold that agent’s credential. - Run each command as written here. Do not preview, back up, or inspect around it.
- Show your person every link the CLI prints, as a bare URL on its own line. Then wait for them. Do not guess that they approved.
- Every
oneclicommand you run prints JSON. Read thecodeandactionfields of an error before you retry. - If you cannot run a command, give your person the exact command and wait. Do not claim it is done.
- Do every step that applies, in order.
Step 1: Install or update the CLI
onecli binary from GitHub Releases, and replaces an older one. Run onecli version again to confirm it is on your PATH.
If your person named their own OneCLI address, set it in the shell of every onecli command you run. Skip this on OneCLI Cloud:
Step 2: Sign in
Check whether you are signed in already:"code": "AUTH_REQUIRED", sign in. onecli login prints a sign-in link, opens it in the browser, and then waits up to 5 minutes for your person. Run it in the background so you can read the link while it waits:
--no-open. The link works from any device.
Step 3: Ask where the agent runs
Ask your person one question, and wait for the answer:Step 4: Connect a free demo sandbox
The demo sandbox is a preview. It may change or be removed. Each person gets one, once, where their OneCLI offers it.
demo-sandbox. This takes a few seconds. Once it is connected:
For
DEMO_SANDBOX_STARTING, do not ask again: a box is starting now. Wait 30 seconds, then run onecli demo start again.
Once the box is connected, prove it with the same call, twice, inside the box. onecli demo run runs one shell command there and prints its output. Pass the command as one quoted string. First around OneCLI, with no credential:
sh -lc) reads the proxy settings that connecting wrote in the box:
ends_at, and that their dashboard lists it as demo-sandbox. You can run more commands in it with onecli demo run -- '<command>', and end it now with onecli demo end. Go to Step 7.
Step 5: Connect your own sandbox or server
List your person’s vaults:"personal": true.
Make a one-use connect token for the new agent. Name the agent so your person can tell their agents apart, and name the provider: e2b, daytona, docker, or what the place is.
install_command inside the place where the new agent runs, as the user the agent runs as. It needs sh and curl, and it connects that place, not yours:
If you can reach that place yourself, such as a container on this machine, run the line there. Otherwise give your person the line and where to run it, then wait for them.
Check that the new agent is connected:
401:
200. A login shell reads the proxy settings that connecting wrote there. Start the agent from a login shell too, such as a new SSH session, so its calls go through OneCLI:
docker exec <container> sh -lc '...'. If you cannot run commands there, give your person the two lines. Go to Step 7.
Step 6: Connect this machine
This choice comes last. An agent connected on this machine sends its calls through the gateway, so it stays apart from you: your person connects it, in a new terminal, and you do not. Runonecli vaults list to find the vault id, as in Step 5. Then give your person these lines, with their vault id, a name for the agent, and the agent they use (claude, codex, cursor, hermes, opencode, or openclaw):
--no-profile keeps the proxy out of their other shells, so it never reaches you. The second line proves it: it prints 200, because the gateway added the Test key. The third starts their agent with the proxy and the OneCLI certificate for that session only.
Wait for your person, then run onecli agents list --mine to see the new agent. Go to Step 7.
Step 7: Offer a first real app
The Test key is only a demonstration. Ask your person which app they want their agent to use first, such as GitHub, Gmail, or Slack. Then give them the link that adds it to the agent’s vault, with the vault id and the app:origins.external in the answer of curl -s <your API address>/v1/instance.
If they want no app now, tell them they can add one later from the vault’s page.
Report back
Finish with a report of four lines at most:- Where the new agent runs, its name, and its vault.
- The two status codes of the proof.
- The app you offered, with its link, or that none was asked for.
- Any step you could not do, with the exact command your person should run.
After setup
You stay signed in for 90 days, so your person can ask you to connect more agents at any time: start again at Step 3. Each agent gets its own one-use token.When something fails
Reference
- The agent guide your instance serves:
GET /v2/skill - Every command and flag: CLI reference
- How the gateway adds credentials: How it works
- Who may use what: Agent access