AgentKit
ReferenceCLI commands
BetaYou are reading docs for the beta channel (2.4.1-beta.1) — updated automatically on every beta release.Switch to stable →

CLI commands

ak backups

Manage rollback snapshots

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.

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

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

Flags

FlagDescription
-h, --helphelp for backups
--jsonEmit machine-readable JSON (implies --no-interactive)
--no-interactiveDisable interactive prompts (CI-safe)
-q, --quietSuppress non-error output on stderr
-V, --verboseExtra diagnostic output on stderr (loses to --quiet)
-y, --yesAssume yes for all prompts

Output modes

ModeBehavior
prettydefault on TTY (colors, ASCII markers)
plainauto when stdout piped or --no-interactive
json--json (single-object envelope, NDJSON-safe)

Exit codes

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

On this page