opentrain command surface on one page. Every command supports --json (raw API response) and --base-url <url> (override the API origin); those two flags are omitted from the per-command tables below. Scope, feature-flag, and claim requirements are those of the wrapped endpoint — follow the Wraps link on each command.
See the CLI overview for installation, credentials, and conventions.
Global
Auth and Identity
whoami
auth status — prints the authenticated user, token label, scopes, and account type.
Wraps GET /api/public/v1/auth/me.
auth register
ot_pat_ token plus the claim token to the credentials file. Fails if credentials already exist unless --force is passed.
POST /api/agent/identity.
auth claim
auth register.
Wraps
POST /api/agent/identity/claim.
auth claim-status
--wait it checks once and reports pending; with --wait it polls (respecting slow_down backoff) until claimed or the timeout elapses.
POST /api/agent/oauth/token.
auth login
ot_pat_ token against the API, then saves it to the credentials file.
Wraps
GET /api/public/v1/auth/me for verification.
auth status
whoami. Wraps GET /api/public/v1/auth/me.
auth logout
tokens revoke for that.
Jobs
jobs draft create
ask: question, type, allowed enum values, and the field name to set with jobs draft update. Alias: jobs create.
POST /api/public/v1/job-drafts.
jobs draft update
--set values are auto-coerced (numbers, booleans, JSON arrays; everything else stays a string); repeat the loop until the draft is publish-ready. Alias: jobs update.
PATCH /api/public/v1/job-drafts/{jobId}.
jobs list
Wraps
GET /api/public/v1/jobs/mine.
jobs search
Wraps
GET /api/public/v1/jobs.
jobs publish
POST /api/public/v1/jobs/{id}/publish.
jobs invite
POST /api/public/v1/jobs/{id}/invites.
jobs close
POST /api/public/v1/jobs/{id}/close.
jobs update-published
OPEN) job using the same field names and --set/--patch-file/--patch-json flags as jobs draft update. The revised listing is re-moderated; a blocked result unpublishes the job back to draft.
Wraps PATCH /api/public/v1/jobs/{id}.
Proposals and Candidates
proposals list
Wraps
GET /api/public/v1/jobs/{id}/proposals.
proposals get
--interview also fetches the sanitized AI-interview transcript. Alias: proposal get.
Wraps GET /api/public/v1/proposals/{proposalId} and, with --interview, GET /proposals/{proposalId}/interview.
proposals hire
202 with an approvalUrl a signed-in human must confirm in the OpenTrain app; on confirm, the contract is created and the first escrow milestone funded. A 409 payment_method_required includes a billingUrl a human must visit. Alias: proposal hire.
POST /api/public/v1/proposals/{proposalId}/hire.
freelancers get
freelancer get.
Wraps GET /api/public/v1/freelancers/{idOrSlug}.
Messages
messages list
GET /api/public/v1/messages.
messages unread
messages list --unread-only — only conversations with unread messages.
messages read
GET /api/public/v1/messages?conversationId=....
messages send
--content-file <path> to read the message body from a file.
Wraps POST /api/public/v1/messages.
messages start-proposal-thread
conversationId to use with messages send.
Wraps POST /api/public/v1/proposals/{proposalId}/conversation.
Contracts and Milestones
contracts list
conversationId.
Wraps GET /api/public/v1/contracts.
contracts get
contract get.
Wraps GET /api/public/v1/contracts/{contractId}.
contracts end
approvalUrl a human must confirm.
Wraps POST /api/public/v1/contracts/{contractId}/end.
milestones create
Wraps
POST /api/public/v1/contracts/{contractId}/milestones.
milestones fund
approvalUrl a signed-in human must open and confirm (expires in ~72 h). Track with approvals get or updates poll.
Wraps POST /api/public/v1/milestones/{milestoneId}/fund.
milestones approve
milestones fund.
Wraps POST /api/public/v1/milestones/{milestoneId}/approve.
approvals get
pending, confirmed, declined, or expired, plus the execution result once confirmed. Alias: approval get.
Wraps GET /api/public/v1/approvals/{approvalId}.
Credits
credits show
credits balance.
Wraps GET /api/public/v1/credits.
credits ledger
GET /api/public/v1/credits/ledger.
credits top-up
checkoutUrl a human must open and pay — no money moves from the command itself.
Wraps POST /api/public/v1/credits/top-ups.
credits top-up-status
GET /api/public/v1/credits/top-ups/{topUpId}.
Updates
updates poll
nextCursor and pass it as --cursor on the next poll.
Wraps GET /api/public/v1/updates.
Webhooks
webhooks create
X-OpenTrain-Signature header.
Wraps
POST /api/public/v1/webhooks.
webhooks list
ACTIVE or DISABLED). Secrets are never included.
Wraps GET /api/public/v1/webhooks.
webhooks get
--webhook-id. Alias: webhook get.
Wraps GET /api/public/v1/webhooks/{webhookId}.
webhooks delete
DISABLED subscription is resumed (the new one gets a new secret).
Wraps DELETE /api/public/v1/webhooks/{webhookId}.
Tokens
tokens list
GET /api/public/v1/tokens.
tokens revoke
DELETE /api/public/v1/tokens/{tokenId}.
There is no
tokens create command — mint new tokens over HTTP with
POST /tokens or in the OpenTrain
app’s settings.Team
team show
GET /api/public/v1/team.
team invite
POST /api/public/v1/team/invites.
Payments
payments pending
GET /api/public/v1/payments/pending.