User quickstart¶
This guide takes you from installation to your first authenticated API requests.
1. Install obi¶
Install the CLI as a persistent tool with uv:
You can also run it without installing it:
2. Sign in¶
The command prints a short code. In the Obitrain mobile app, open Account -> Link a device, enter the code, and approve the request. The CLI stores the resulting API token in your active profile.
Confirm the session:
See Authentication for API tokens, multiple profiles, and ephemeral credentials.
3. Make a request¶
obi api accepts any Obitrain API path:
Output is formatted for reading when you use an interactive terminal. Use --json when you want
plain JSON:
4. Discover endpoints¶
The OpenAPI contract is bundled with obi, so these commands work offline:
schema show displays parameters, request bodies, responses, and referenced schemas for an
operation.
5. Send data¶
Pass JSON directly or read it from a file. Providing -d implies POST unless you set a method
with -X.
Use -n to inspect the resolved request without sending it:
The token is redacted from dry-run output. See Making requests for all request and output options.