Skip to main content
Normal output is made for people to read. If a script or another program needs to read it, add --json:
Results are printed to standard output (stdout). Progress messages and errors go to a separate stream, standard error (stderr). That way you can pipe the result straight into a tool like jq without the messages getting mixed in.

Errors as JSON

Even with --json, errors are plain text by default. Add --error-json to get each error as one JSON object on stderr:
The error object contains:
  • the kind of error,
  • the HTTP status,
  • Rivvr’s error code and correlation ID (give these to support),
  • the IDs of anything the command created before it failed.
That last item helps when a command fails halfway: it may already have created something, and the IDs tell your script what. --error-json only works together with --json. It also turns off the normal progress messages. rivvr deploy can also print its progress as JSON on stderr. Add --progress-json, together with both --json and --error-json.

Questions and confirmations

rivvr never asks questions when it runs with --json, when there’s no terminal (for example, in a script), or when the CI environment variable is set. Commands that would normally ask “are you sure?”, such as deletes, fail instead. Add --yes to confirm in advance. --yes only answers “are you sure?”. It doesn’t fill in missing options, and it doesn’t get around permission checks.

Exit codes

Every command ends with a number. Scripts can check it to see what happened:

Waiting and retries

Commands that support --wait wait up to 30 minutes. Change that with --timeout, for example --timeout 1h. Stopping a wait, with Ctrl-C or because time ran out, only stops rivvr on your computer. Nothing on Rivvr’s side is cancelled or undone. Keep the IDs it printed and follow recovery before you run the command again. rivvr doesn’t automatically retry commands that create something, and it doesn’t retry prompts. The one exception: finishing an upload is retried a few times if the error looks temporary.