--non-interactive turns prompts off anywhere.
Set FASTINO_API_KEY from your CI’s secret store. The CLI uses it when no login is saved. Don’t pass the key on the command line, where shell history and other processes can see it.
This script starts a run, approves its plan, and waits for the result. PROJECT_ID holds a project ID from fastino project list. BUILD_ID holds your CI’s build ID, which stays the same when a step is retried, such as GITHUB_RUN_ID on GitHub Actions.
--dataset, --benchmark and --budget answer the agent’s three questions up front, so the plan is usually the first thing the run waits on. With --idempotency-key, a retried step gets the same run back instead of starting a second one. The script approves only when a plan is waiting, so a retry after the approval goes straight to the last run wait. A key reused for a different start is refused.
--revision approves only the plan you read. A ceiling below the plan’s estimate is refused unless you add --acknowledge-underfunded. Plans that need a spend cap refuse an approve without --ceiling. A run that pauses at its cap continues after fastino run raise-cap <run> <usd>.
If you leave out --dataset, --benchmark or --budget, the agent may ask that question first. run wait also exits 3 then, and fastino run status <run> shows the question. Answer it with fastino run answer <run> "<choice>", adding --amount <usd> for the budget question, and wait again.
What --json prints
- stdout carries only JSON. Spinners, progress and notices go to stderr, so you can pipe stdout into
jqor save it to a file. - Most commands print one JSON document. Commands that follow something over time, such as
job watchandjob logs --follow, print one JSON object per line as they go. - When a command fails, stdout ends with an
errorobject. It holds acode, amessage,retryable,userActionRequired, andnextsteps to try.
Exit codes
Page through training jobs
fastino job list returns up to 200 jobs per page, newest first. --limit sets the page size, from 1 to 200, and --offset skips jobs. Each page has count, total and has_more, so raise --offset by the page size while has_more is true:
Confirm with --yes
run cancel, team role, billing limit and buy credits ask you to confirm. Where the CLI can’t prompt, such as in CI, they stop with exit code 2 unless you add --yes.
Buy credits
--attempt-id makes a retried step reuse the same purchase, so the card is never charged twice. It takes up to 64 letters, digits, - or _. fastino buy credits <usd> --dry-run shows the charge and the card without buying. --clear-pending forgets an unconfirmed purchase, so the next one starts a new attempt.
When the team has no saved card, or the bank asks to confirm the payment, the command prints a Stripe Checkout link and exits 3. Buying credits needs the owner, admin or billing role.
