AgentKit
DocsKitsCLI ReferenceDesktop App
BetaYou are reading docs for the beta channel (3.4.0-beta.1). Features may change before the next stable release.Switch to stable →

ak backups

ak backups list

List committed rollback snapshots newest first and understand which integrity details are available in each output mode.

Use ak backups list to discover committed rollback snapshot IDs before you inspect, verify, prune, or restore one. Results are ordered newest first, followed by compressed checkpoints with the rollback source marked.

Syntax

ak backups list

Before you run

The command reads the local backup store under ~/.agentkit/backups/. It does not require authentication or network access. It reads snapshot manifests only and does not hash captured files, so it stays fast on a large backup set. Run ak backups verify <id> to check one snapshot against its data.

Malformed directory names, non-directory entries, and unreadable or invalid manifests are skipped. A missing backup root is treated as an empty list.

Arguments

The command accepts no positional arguments. An extra argument is invalid.

Options

There are no command-specific options. Shared flags, including --json, --quiet, and --no-interactive, are described in CLI conventions. The command never prompts; --yes has no effect.

Examples

List snapshots for a person:

ak backups list

Select the newest visible ID for a script:

ak backups list --json | jq -r '.data.backups[0].id'

An empty array means no readable committed snapshot was found.

Output and streams

Human output on stdout contains ID, WHEN, KIND, SIZE, and STATUS columns. Because the list does not hash data, STATUS shows - not checked, and the summary line reads N backups - 0 verified - 0 unverified - N not checked (ak backups verify <id>). With no records, it prints a No backups found. empty state.

JSON success uses the shared envelope on stdout:

{
  "schema_version": 1,
  "kind": "backups.list",
  "data": {
    "backups": [
      {
        "id": "20260426T123005Z-deadbeef",
        "created_at": "<rfc3339-time>",
        "label": "<operation-label>",
        "files": 3
      }
    ]
  }
}

Compressed checkpoints follow the snapshots. In the human table their KIND column is checkpoint:<purpose>, with (rollback source) appended to the newest pre-upgrade checkpoint that ak rollback --to v2 would restore. In JSON they form a separate data.checkpoints[] array, omitted when there are none:

{
  "id": "20261019T080000Z-1a2b3c4d",
  "created_at": "<rfc3339-time>",
  "label": "<label>",
  "purpose": "pre-upgrade",
  "scope": "lean",
  "files": 1200,
  "archive_bytes": 52428800,
  "rollback_source": true
}

The JSON snapshot entry intentionally omits the human table's byte size and STATUS column. An empty result is "backups": []. Runtime errors in JSON mode use a structured error envelope on stderr. With --json enabled, unknown or invalid flags use the shared JSON stderr error envelope (error_code: validation_failed, exit 2). Human mode, including --json=false, prints Usage.

Exit status

ExitMeaning
0Listing completed, including when no readable snapshots exist.
1The backup root could not be read, listing was interrupted, or rendering failed.
2A positional argument or flag was invalid.

The command does not use exits 3, 4, or 5 for individual skipped entries.

Effects, safety, and recovery

The command is read-only. It does not acquire the mutation lock, change a manifest, delete a snapshot, or modify live runtime files. It reads manifests only; ak backups verify <id> is the command that rereads files and recomputes hashes.

The list never reports a snapshot as verified or unverified. Run ak backups verify <id> for a classified result. A corrupt manifest can be absent from the list entirely, so an empty or shorter list is not proof that no snapshot directory exists on disk.

The staged database produced by ak backups create has no committed snapshot ID and therefore does not appear here.