saved.sh

The CLI

Everything the dashboard can do, from a terminal.

The saved CLI is not a subset of the dashboard. Anything you can do in the browser you can do here, because both call the same API.

Signing in

saved login          # device code: prints a code, you approve it in a browser
saved auth whoami    # who am I, and in which workspace

The session lives in a config file at $XDG_CONFIG_HOME/sctl/config.yaml, mode 0600. Switching workspace re-mints your token into that workspace, so every command acts on exactly one workspace, the one your session is scoped to.

saved workspace list
saved workspace switch analytics
saved workspace current

Command surface

CommandCovers
loginDevice-code sign-in
authSession state (whoami)
workspaceList, create, switch, current
memberMembership and invitations
roleCustom roles and their permission bundles
apikeyOrg-scoped API and SDK keys
workerProvision, list, rotate, delete
backupCreate, configure, trigger, pause, resume, delete, submit
runHistory: run list --backup, run get
artifactList, get, download, delete
restoreClient-side restore of an artifact
applyReconcile a YAML manifest

Two things that look like omissions and are not:

  • backup create takes --kind; backup configure does not. Kind is immutable after creation, so there is no field to patch.
  • There is no artifact lock. Protection is a property of the backup's retention policy (--lock-for), stamped onto each artifact as it is archived. A per-artifact lock would be a second source of truth for the same guarantee.

Automation

For CI, use an API key rather than your own session. It is scoped to exactly the permissions you grant it, and revoking it does not sign you out.

saved apikey create ci-backups --permissions backups:trigger,runs:read
export SAVED_API_KEY=...
saved backup trigger prod-db

A key with backups:trigger and nothing else is refused if it tries to delete an artifact, and the refusal names the permission it lacked rather than returning a bare 403.

Declarative

saved apply -f saved.yaml

apply reconciles what the file declares and never deletes what the file omits. Removing something is always explicit:

saved backup delete prod-db

That asymmetry is deliberate. A file is easy to typo, easy to check out at the wrong revision, and easy to run from the wrong directory; none of those should be able to destroy a retention policy.

On this page