A new CLI needs a source, a name, and a place for its code. This page covers each choice and its limits. For the shortest path, see the Quickstart.
Choose a source
Every CLI builds from an OpenAPI spec. Give Okibi the spec, or something an agent can write it from.
| Source | In the app | In the CLI |
|---|---|---|
| An OpenAPI document | OpenAPI spec: paste its link or drop the file | --spec ./openapi.yaml or an https:// link |
| Public API docs | Docs or code: paste the docs link | --docs https://docs.example.com/api |
| A GitHub repository | Docs or code: paste the repo link | --repo github.com/OWNER/REPO |
| Another git host | Not available | --repo with any https:// git link |
| A local codebase | Not available | okibi generate ./path |
| Okibi's example | Try our example | --example |
- Use one source per CLI.
- From a spec, the first version builds in about a minute.
- A repository that already has an accurate OpenAPI spec can start from it:
--repo github.com/OWNER/REPO --spec ./openapi.yaml(or a link). The first version builds straight from that spec, in about a minute. The CLI's source is still the repository: once its code changes, Regenerate (or a push to a watched branch) has the agent rewrite the spec from the code, starting from yours. The app's form doesn't offer this yet. - From docs, a repository, or a codebase, an agent writes the OpenAPI spec first. That takes about 7 minutes for docs. For a repository it depends on its size, up to about 30 minutes. The create form says how long, and
okibi repos estimate github.com/OWNER/REPOdoes too. - A private GitHub repository works when the GitHub account linked to your Okibi login can read it. If it can't, the build stops with "This repo is private or doesn't exist." and offers Connect GitHub.
- Links start with
https://orhttp://, with no username or password in them. - OpenAPI files are JSON or YAML (
.json,.yaml,.yml), up to 50 MiB. - A local directory is uploaded as one archive, up to 200 MiB compressed. In a git repository, okibi follows your
.gitignore. It always skips.git,node_modules,dist,build,target,vendor,.venv,.next,__pycache__, symlinks, and.envfiles (except ones ending in.example). - A repository builds from its default branch.
Create it in the app
- Click New CLI on the workspace Overview or the Projects page.
- If you can build in more than one workspace, pick the Workspace.
- Enter a Name: the command your users type.
- Under Start from, pick OpenAPI spec or Docs or code, and give it the source.
- Under Where the code goes, pick an Okibi-hosted private repo, or My GitHub to keep it in a private repo you own. My GitHub is part of Pro.
- Click Create CLI.
The build view follows it: Create, Build, Ready. You can leave the page: Okibi emails you when it's ready, or if the build stops.
Create it in the CLI
okibi generate --spec ./openapi.yaml --name my-cli --workspace acme| Flag | What it does |
|---|---|
--name | Required. The command your users type. --example defaults to petstore. |
--spec, --docs, --repo, --example, or a directory | The source. Use one. --spec can go with --repo as its starting spec. |
--destination | hosted (the default) or github for your own GitHub (Pro). |
--github-account | With --destination github: the connected account the code goes to. |
--workspace | Workspace slug. Falls back to OKIBI_WORKSPACE, then this machine's default workspace. Ignored for workspace-locked keys. |
--out | Where to unpack the finished CLI. Defaults to ./<name>. |
--no-pull | Skip the download. |
--no-wait | Start the build and return its run id. |
--json | Print the build as JSON once it settles. |
--rebuild | Give a CLI whose first build never shipped a new source. |
Before it uploads anything, okibi checks your plan has room for another CLI, and for My GitHub (--rebuild skips this). Then it prints the run id and follows each step. Ctrl-C only stops watching: the build keeps going, and okibi status --cli my-cli finds it again. In the TUI, /new asks for the same things. See Builds and okibi generate.
Name rules
- 1 to 64 lowercase letters, numbers, or hyphens.
- Starts with a letter. Ends with a letter or a number.
okibiis reserved.- One name per workspace. If
my-clialready exists, rebuild it with Regenerate orokibi regenerate my-cli.
If a CLI's first build never shipped, you can give it a new source. In the app, the failed build offers Use another source (or Use other docs), Upload a new spec for a spec, or Rebuild. Each opens the form as Rebuild my-cli, where you can change the source. From the terminal, run okibi generate --rebuild --name my-cli with the new source.
Rename it
Open Settings > Basics. Click Rename next to Command to rename the CLI everywhere, its hosted repository included. Click Rename next to Project name to change only the name the app shows.
You can't rename a CLI while it builds or publishes.
What happens next
- v1 builds. It runs the steps Spec, Codegen, Lint, Build, and Test. On Spec, it reads your spec, or an agent writes it first.
- You can use it. v1 is ready to install while agents improve it. The first build publishes on its own.
- Agent ready optimization suggests improvements to login, command names, help and examples, and workflow commands. Nothing changes until you accept them in the studio.
The API base URL comes from the spec. To change it later, see Change the API endpoint.
