Okibi Identity lets the people who use your generated CLI sign in with Okibi. Your API checks each request with the Okibi Partner Kit and still decides what each person may do.
When to use it
Use it when you run the API your CLI calls and can deploy changes to it. The Okibi sign-in switch decides whether users are offered it.
- A CLI built on the pipeline gets Identity built in from your partner registration. Turning the switch on or off, registering, or re-registering rebuilds the CLI once from the spec it was last published from, at no charge. The rebuild publishes through the CLI's release path, like any automatic build. A CLI with no official release picks it up on its first publish.
- A CLI an older generator built already includes Identity, so the switch takes effect right away.
Open the project, click Identity in its sidebar, and turn on Okibi sign-in.
Connect your API
- On the Identity page, copy the prompt under Give this to your coding agent.
- Open your backend repository in your coding agent and paste it. The agent installs
@okibi/partner-kitand follows the setup guide inside it. - Deploy your service to a public HTTPS URL.
Then register it. Only workspace owners and admins can do this.
- Under Partner registration, enter the Deployed service URL and click Register partner API.
- Okibi runs its hosted production checks. If they pass, it registers your API and signs your latest published release.
- A dialog shows the new credentials. Click Download env file and move the values into your server's secret manager. Okibi shows the secret only this once.
After you change your deployment, click Run health check under Deployment health, or run okibi identity verify my-cli --url https://api.example.com --hosted.
Lost the secret? Click Rotate partner secret, or run okibi identity partner rotate-secret my-cli --write-env <new-file>. Requests fail until your server has the new value.
How your users sign in
Your users run your generated CLI, not okibi:
my-cli auth login my-cli auth login --email tester@example.com my-cli auth login --code <code> my-cli auth status
auth loginopens the browser. If that can't work, it falls back to a device code.--emailsends a one-time approval email instead. The user clicks Approve in the email, or finishes with--code.- If the person already signed in to another CLI that uses Okibi Identity on this machine,
auth loginreuses that sign-in. my-cli auth nativeswitches to your service's own sign-in.my-cli auth native --offswitches back.
If your CLI already had its own --email or --code flag, check my-cli auth login --help for the names it uses.
Add Okibi to your own sign-in
The optional Sign in with Okibi card lets your existing auth system recognize the same person who approved the CLI. It is standard OIDC, for Clerk, Supabase, Auth0, Better Auth, Auth.js v4, WorkOS, Amazon Cognito, or Other OIDC. It unlocks once your API is registered. Only workspace owners and admins can set it up.
- Pick your Authentication system.
- Under Authorized redirect URLs, enter your provider's exact callback URL, one per line, up to five.
- Click Create OIDC client and copy the client secret. It is shown once.
- Follow the steps under Configure for your provider, then sign in once. The card shows Connection proven when it works.
From the terminal, okibi identity federation init my-cli --redirect-uri https://accounts.example.com/oauth/callback --write-env ./okibi-oidc.env detects your provider and prints its setup steps. See okibi identity for every command.
Apps and APIs without a CLI
Identity also works for your own apps and APIs that have no Okibi CLI. They live in Identity-only projects, listed on the Projects page with their own Okibi Identity project page.
okibi identity projects list okibi identity projects create acme-platform okibi identity apis register --url https://api.example.com --project acme-platform --write-env ./acme-api.env okibi identity apps create acme-desktop --kind native --project acme-platform okibi identity apps create acme-web --kind server --project acme-platform --redirect-uri https://app.example.com/callback --write-env ./acme-web.env
- An API registers like a partner API: add Partner Kit, check it with
okibi identity verify --url http://localhost:PORT, deploy it, then register the deployed URL.okibi identity apisalso lists, renames, retires, and rotates the secret of each one. - An app asks people for access to your workspace's APIs. A native app runs on the person's machine and needs no secret. A server app returns people to one of its redirect URLs and gets a client secret.
okibi identity appsalso lists, updates, retires, and rotates the secret of each one. - The okibi-auth helper signs people in to apps and CLIs on their machine. Install or update it with
okibi identity helper install.
Owners and admins can delete an Identity-only project that holds no API and no apps, from its page or with okibi identity projects delete <project> --yes.
