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 recover

Recover AgentKit state from a snapshot

Replay every file in a rollback snapshot back to its original on-host path. Top-level alias for ak backups restore so scripts, docs, and dashboard guidance can use the product verb without a separate recovery path. Manifest is verified end-to-end before any live file is touched.

Who it's for: Both: non-technical users recovering from a bad install, and power devs rolling back in CI.

When to use it: After a failed update or migration, or when you need to roll back to a known-good prior state.

What changes on disk: Overwrites files under ~/.claude/plugins/ and ~/.agentkit/skills/ to match the snapshot.

Usage

ak recover [id] [flags]

Examples

ak recover --latest                                  # restore the newest snapshot
ak recover --latest --yes                            # CI-friendly, skip confirmation
ak recover 20260426T123005Z-deadbeef --dry-run       # preview the restore plan
ak recover 20260426T123005Z-deadbeef --json          # machine-readable result

Flags

FlagDescription
--dry-runPrint the restore plan without modifying live files
-h, --helphelp for recover
--jsonEmit machine-readable JSON (implies --no-interactive)
--latestRestore the most recently created snapshot (mutually exclusive with positional <id>)
--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)
3user declined the confirmation prompt
4another ak backups operation already holds the lock
5snapshot id not found or no snapshots exist
  • ak — AgentKit CLI

On this page