AgentKit
ReferenceCLI commands

CLI commands

ak migrate rollback

Roll back a failed migration to its pre-apply state

ak migrate rollback

Roll back a failed migration to its pre-apply state

Synopsis

What it does: Restore the migration target to its pre-apply state using the most recent rollback journal written by a failed ak migrate apply. A failed apply is resumable by default; use rollback to undo it instead.

Who it's for: Anyone recovering from a failed or unwanted migration apply.

When to use it: After ak migrate --dry-run=false failed or produced an unwanted result.

Examples: ak migrate rollback

What changes on disk: Restores files recorded in the rollback journal; removes the journal on success.

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)

ak migrate rollback [flags]

Options

  -h, --help             help for rollback
      --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

  • ak migrate - Migrate an existing ClaudeKit install to AgentKit

On this page