{
  "id": "imap-backup",
  "name": "imap-backup",
  "homepage": "https://github.com/joeyates/imap-backup",
  "description": "Back up IMAP mailboxes",
  "executables": [
    "imap-backup"
  ],
  "dotfiles": {
    "paths": [],
    "secret": [
      "~/.imap-backup/config.json"
    ]
  },
  "commands": {
    "format": 1,
    "label": "IMAP backup",
    "description": "Back up configured accounts or restore one account. Account setup and the single-account commands are outside this form.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "backup"
        ],
        "label": "Back up accounts",
        "description": "Incrementally copy all configured accounts to disk.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://github.com/joeyates/imap-backup/blob/main/docs/commands/backup.md",
            "revision": "2026-10-27",
            "evidence": "imap-backup backup\nVerbose output can be configured by adding the `--verbose` (or `-v`) parameter.\nAdd that parameter twice will also show all network traffic between\n"
          }
        ],
        "field": [
          {
            "id": "verbose",
            "label": "Verbose",
            "description": "Repeat to also show IMAP network traffic.",
            "type": "count",
            "option": [
              "--verbose",
              "-v"
            ],
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "backup",
            "label": "Back up all accounts",
            "fields": [
              "verbose"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "verbose"
            ]
          }
        ]
      },
      {
        "path": [
          "restore"
        ],
        "label": "Restore an account",
        "description": "Push missing backed-up messages to the IMAP server; existing messages are left unchanged.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://github.com/joeyates/imap-backup/blob/main/docs/commands/restore.md",
            "revision": "2026-10-27",
            "evidence": "imap-backup restore EMAIL_ADDRESS\nAll missing messages are pushed to the IMAP server.\n"
          }
        ],
        "field": [
          {
            "id": "email",
            "label": "Email address",
            "type": "string",
            "position": 0,
            "min": 1,
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "restore",
            "label": "Restore an account",
            "fields": [
              "email"
            ],
            "required": [
              "email"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "email"
            ]
          }
        ]
      }
    ]
  }
}
