# okibi generate

> Generate a CLI from code, API docs, or an OpenAPI document

Generated from okibi 0.2.4. Every command also accepts `--agent`; see [Agent and CI mode](https://okibi.ai/docs/cli/agent-mode.md).

## okibi generate

Submits a generation run to the Okibi cloud and streams progress. With a directory (default: .), the working tree is packaged and uploaded; --repo clones server-side; --docs lets the sandbox agent research public API documentation; --spec accepts either a local OpenAPI file or an https:// spec URL as evidence for that same agent.

```sh
okibi generate [dir] [flags]
```

Flags:

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--api-base-url` | string |  | base URL the generated CLI should target (stored on the CLI; recorded in cli-spec.md so it's set once) |
| `--api-url` | string | https://okibi.ai | Okibi API base URL |
| `--docs` | string |  | public API documentation https:// URL (no codebase required) |
| `--identity` | bool |  | request Okibi Identity explicitly (retained for compatibility; current generations include it by default) |
| `--name` | string |  | binary name for the generated CLI (kebab-case) |
| `--no-pull` | bool |  | don't download the artifact when the run succeeds |
| `--out` | string |  | directory to unpack the generated CLI into (default: ./<name>) |
| `--repo` | string |  | git URL to clone server-side instead of uploading |
| `--review` | bool |  | propose a spec and pause for your approval before building (okibi spec approve/reject) |
| `--spec` | string |  | OpenAPI document path or https:// URL (no codebase required) |
| `--spec-only` | bool |  | update cli-spec.md only, then pause for approval and commit it — no build (free) |
| `--workspace` | string |  | workspace slug for this run (or OKIBI_WORKSPACE; ignored for workspace-locked keys) |
