Skip to content
Obitrain

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

One interface for the whole API

  • User-friendly. Common checks are one short command away — obi auth whoami shows who you are signed in as:

    obi auth whoami rendering a profile card

  • Readable in a terminal. Tables and highlighted output are used on a TTY, with enum codes labeled (friends (2), not just 2).

  • Easy to explore. obi schema searches 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 --json and -o.
  • Safe to operate. Tokens are stored per profile with 0600 permissions, and -n dry-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.