Docs
Tract has a web app, a command line and an HTTP API. They work with the same organisation, sessions and approvals.
Sign in
Sign in to the web app with your Mudbase account. The web app starts at /app; a signed-out visitor is taken to the sign-in page there.
On the command line, run tract login --token-stdin. The token is read from standard input, never from an argument.
Command line
| Command | What it does |
|---|---|
tract login --token-stdin | Sign in. The token is read from standard input. |
tract status | Who you are, the organisation, the connection and running sessions. |
tract workflows | List published workflows. tract workflows show <name> lists the inputs a workflow takes. |
tract run --remote <workflow> --input key=value | Start a session from a published workflow. Add --no-wait to return at once. |
tract sessions | List sessions, newest first. tract sessions show <id> shows one session and its tasks. |
tract approvals | List pending approvals, pending first, with the time left. approve <id> and reject <id> --reason decide one. |
tract cancel <session> | Cancel a session after a confirmation. --yes skips the confirmation. |
tract usage | Usage and limits for this period. |
tract logout | Revoke this computer's connection and remove the token from it. |
Every command takes --json. Exit codes: 0 success, 1 general error, 2 usage error, 3 not signed in or sign-in expired, 4 forbidden (your role, the approval policy, or a plan limit), 5 approval rejected, 6 timed out.
HTTP API
Send an API key as a bearer token in the Authorization header: Authorization: Bearer <key>. The web app lists your organisation's API keys under Developers.
Two health endpoints need no key. GET /healthz reports that the service is running. GET /readyz reports whether it is ready to take work.
Plans and limits
Each plan sets a monthly task allowance and how many sessions can run at once. See Plans.