AgentKit
ReferenceCLI commands

CLI commands

ak backups

Manage rollback snapshots

ak backups

Manage rollback snapshots

Synopsis

What it does: Inspect and manage AgentKit rollback snapshots stored under ~/.agentkit/backups/. Each snapshot captures the project registry, kit plugin install dirs, and per-skill envs at a single point in time.

Who it's for: Power devs recovering from a bad migration; non-technical users via the matching dashboard surface.

When to use it: Snapshots are produced automatically before mutating commands (ak update, ak uninstall, ak migrate) once those epics ship; today they are also producible by future tooling that calls into this package directly.

Examples: ak backups list # newest-first listing ak backups list --json # script-friendly envelope ak backups show <id> # manifest detail ak backups verify <id> # integrity check (ok | corrupt) ak backups restore <id> # roll state back to snapshot ak backups prune --older-than 30d # delete snapshots > 30 days ak backups prune --keep-last 5 # retain the 5 newest ak backups prune --older-than 30d --dry-run # preview the deletion plan

What changes on disk: Read-only at this group level; subcommands document their own effects under ~/.agentkit/backups/.

Output modes: pretty default on TTY (colors, ASCII markers) plain auto when stdout piped or --no-interactive json --json (single-object envelope, NDJSON-safe)

Exit codes: 0 success 1 runtime error 2 invalid flags 3 user-cancel (SIGINT, prompt-cancel)

Options

  -h, --help             help for backups
      --json             Emit machine-readable JSON (implies --no-interactive)
      --no-interactive   Disable interactive prompts (CI-safe)
  -q, --quiet            Suppress non-error output on stderr
  -V, --verbose          Extra diagnostic output on stderr (loses to --quiet)
  -y, --yes              Assume yes for all prompts

SEE ALSO

On this page