obi
The command-line client for the Obitrain API:
authenticate once, call any endpoint, and discover the API contract offline.
uv tool install obitrain # exposes the `obi` binary
obi auth login # approve a short code in the Obitrain app — no password
obi api /v1/training/sessions -q limit=5
User quickstart
Install
obi, sign in, discover endpoints, and make your first requests.
Agent quickstart
Use the CLI from an AI agent with JSON output, stable exit codes, and recovery hints.
Authentication
Device-code login, API tokens, profiles, and ephemeral credentials.
Making requests
One generic obi api command: methods, query params, bodies, dry-run.
Discovering the API
Search endpoints and inspect parameters, payloads, responses, and schemas offline.
One interface for the whole API¶
-
User-friendly. Common checks are one short command away —
obi auth whoamishows who you are signed in as: -
Readable in a terminal. Tables and highlighted output are used on a TTY, with enum codes labeled (
friends (2), not just2). - Easy to explore.
obi schemasearches the bundled OpenAPI contract, so discovery works without network access. - Scriptable. Response bodies go to stdout, diagnostics go to stderr, and explicit output
formats are available with
--jsonand-o. - Safe to operate. Tokens are stored per profile with
0600permissions, and-ndry-runs a request before it is sent.
obi was also designed for reliable use by AI agents. The agent quickstart
documents the machine-facing output, exit-code, discovery, and error-recovery conventions.