Skip to content
⌘K

Get started

Quickstart

Build your first CLI from your API, in the web app or in the terminal.

You need an Okibi account and a source: an OpenAPI document, a public API docs site, a GitHub repository, or, from the terminal, a local codebase.

Pick a path. Both build the same kind of CLI, and both show up in the same workspace.

In the app

1. Open the builder

Sign in at okibi.ai and click New CLI.

A workspace Overview with the New CLI button and recent activity

2. Fill in the form

  • Name: the command your users type, such as acme.
  • Start from:
    • OpenAPI spec: paste a public link to your OpenAPI or Swagger spec, or drop a JSON or YAML file.
    • Docs or code: paste an API docs link or a GitHub repository. An agent writes the OpenAPI spec first, then the CLI builds from it.
  • Where the code goes: an Okibi-hosted private repo, or My GitHub, a private repo you own (Pro).

Click Create CLI. To see it work first, click Try our example.

3. Wait for v1

From a spec, the first version builds in about a minute. When an agent writes the spec from docs or code, that comes first, and the form says how long it takes. You can leave the page: Okibi emails you when v1 is ready, or if the build stops.

4. Install it

The ready page shows the install command. Your customers don't get it yet. To choose what they install, see Releases and install.

5. Review improvements

While you use v1, agent ready optimization works on login, command names, help and examples, and workflow commands. Click Open studio to review what it suggests. Nothing changes until you accept. See The studio.

In the terminal

1. Install okibi

Terminal
curl -fsSL https://okibi.ai/install | sh

Check it worked with okibi --version. If your shell can't find okibi, open a new terminal. On macOS and Linux, also check that ~/.local/bin is on your PATH.

2. Sign in

Terminal
okibi auth login
okibi auth status

A browser opens. Approve the login there and the terminal picks it up. On a remote machine, add --device-code. No account yet? Run okibi auth signup.

3. Generate

Terminal
okibi generate --spec ./openapi.yaml --name my-cli

Use your own CLI name in place of my-cli, and one source:

SourceCommand
An OpenAPI documentokibi generate --spec ./openapi.yaml --name my-cli
Public API docsokibi generate --docs https://docs.example.com/api --name my-cli
A GitHub repositoryokibi generate --repo github.com/OWNER/REPO --name my-cli
A local codebaseokibi generate ./path --name my-cli
Okibi's exampleokibi generate --example

okibi prints a run id and follows the build through its steps: Spec, Codegen, Lint, Build, and Test. It stops following once the build is ready. If the whole build, improvements included, has finished, it downloads the CLI into ./my-cli. Usually they're still running, so it prints the okibi pull command to run later.

CLI names are 1 to 64 lowercase letters, numbers, or hyphens. They start with a letter and end with a letter or number.

4. Review improvements

Terminal
okibi studio improvements my-cli
okibi studio improvements accept my-cli <id>

Accepting builds a new version, which waits for you to publish it with okibi runs publish <run-id>. See The studio.

Switch between them

The app and okibi share the same workspaces and CLIs. Start in one and carry on in the other:

Terminal
okibi clis
okibi clis show my-cli
okibi status --cli my-cli

Closing the terminal doesn't stop a build. Pick it up again with okibi status <run-id>, and download it with okibi pull <run-id> --out ./my-cli.

Next steps