This page is written for coding agents. If you are a person, paste the prompt from Set up with your agent into your agent instead.
You are going to turn the user's code or API into a CLI with Okibi, then help them change and ship it. The build runs on Okibi's hosted platform. You only drive the okibi client. Add --agent to every command: it turns off prompts and prints JSON.
1. Install okibi
Skip this if okibi --version already works.
curl -fsSL https://okibi.ai/install | sh export PATH="$HOME/.local/bin:$PATH"
2. Check the login
okibi --agent auth status okibi --agent workspaces
If there is no login, stop and ask the user to run okibi auth login in their own terminal. It opens a browser. Do not ask for, print, or save their API key.
If the user names a workspace other than their default, add --workspace <slug> to every command.
3. Agree on one source
Ask the user which source to build from, then repeat it back before you run anything:
| Source | Command |
|---|---|
| An OpenAPI document | okibi generate --spec <path-or-https-url> --name <cli-name> |
| Public API docs | okibi generate --docs https://docs.example.com/api --name <cli-name> |
| A public GitHub repository | okibi generate --repo github.com/OWNER/REPO --name <cli-name> |
| A local codebase | okibi generate <dir> --name <cli-name> |
| Okibi's example | okibi generate --example |
Rules:
- Use exactly one source.
- A local directory is uploaded for the hosted build. Only upload it after the user has said it is the source.
- CLI names are 1 to 64 lowercase letters, numbers, or hyphens. They start with a letter and end with a letter or number.
- If the name is taken, the CLI already exists. Rebuild it with
okibi regenerate <cli-name>instead.
4. Build it
okibi --agent generate --spec ./openapi.yaml --name my-cliThe command follows the build through its steps (Spec, Codegen, Lint, Build, Test) and prints one JSON object when it settles: {"build": …}. build.phase is ready or failed. When it failed, build.failure.actions lists the ways on, each with its command, and the command exits 1.
In agent mode, okibi doesn't download the CLI. A build is ready before its improvements finish. Wait until okibi --agent status <run-id> reports status as succeeded, then pull it:
okibi --agent status <run-id> okibi --agent pull <run-id> --out ./my-cli
okibi status <run-id> --json prints the build object itself, without the build wrapper.
5. Change it
Change a CLI through its studio. Read the current state first, then make one change at a time:
okibi --agent studio my-cli okibi --agent studio improvements my-cli okibi --agent studio chat my-cli --text "Group the invoice commands under billing"
studio improvements accept my-cli <id>accepts a suggestion. Show the user what it changes first.studio config my-cliprintsokibi.ymlwith itssha.studio config edit my-cli --file okibi.yml --sha <sha>saves an edit and builds it.studio requests new my-cli "<text>"asks Okibi for a changeokibi.ymlcan't make.
Every change builds, and the build waits for Publish. See The studio.
6. Publish
In okibi --agent status <run-id>, publish.waits says the build will wait for Publish, and publish.available says it can be published now. Publish it only when the user agrees:
okibi --agent runs publish <run-id> okibi --agent clis hosting status my-cli
clis hosting status prints the official release and the install command. Choosing the official release and its audience is covered in Releases and install.
7. Report back
Tell the user:
- The run id.
- The source you built from.
- The CLI name.
- The directory the CLI was downloaded to, or the install command.
Report what the hosted build said. Do not claim checks or live API behavior that the okibi output did not show.
What waits on a person
okibi --agent needs-you lists builds to review or that failed, and releases waiting on a person, each with the command that takes it on. Ask before you act on any of them.
Do not
- Do not look for or run local build tools such as
shipcheck. The build runs on Okibi. - Do not run
okibi clis delete. It needs a human. - Do not change the user's plan.
okibi billing changecharges them. - Do not accept a migration's blocking differences, or publish, on the user's behalf unless they ask.
For every command, see the Command reference, or read okibi <command> --help.
