{
  "id": "offlineimap",
  "name": "OfflineIMAP",
  "homepage": "https://www.offlineimap.org",
  "description": "Read/sync your IMAP mailboxes.",
  "icon": "https://www.offlineimap.org/assets/logo/offlineimap-scalable.svg",
  "executables": [
    "offlineimap"
  ],
  "platforms": [
    "macos",
    "linux"
  ],
  "dotfiles": {
    "paths": [
      "~/.offlineimaprc",
      "[configHome]/offlineimap/config"
    ],
    "exclude": [
      "~/.offlineimap/"
    ],
    "secret": [],
    "secret_paths": [
      {
        "file": [
          "~/.offlineimaprc",
          "[configHome]/offlineimap/config"
        ],
        "match": {
          "prefix": [
            "remotepass",
            "remotepasseval"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Sync mailboxes",
    "description": "Run OfflineIMAP for all or selected accounts and folders. Debug, profiling and delete-folder options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://github.com/OfflineIMAP/offlineimap/blob/master/docs/offlineimap.txt",
        "revision": "master",
        "evidence": "--dry-run::\n  Run in dry run mode.\n--info::\n  Output information on the configured email repositories.\n-1::\n  Limit multithreading operations and run solely a single-thread sync.\n-a <account1[,account2[,...]]>::\n  Overrides the accounts section in the config file.\n-c <path/to/configuration_file>::\n  Specifies a configuration file to use.\n-l <path/to/file.log>::\n   Send logs to <file.log>.\n-f <folder1[,folder1[,...]]>::\n    Only sync the specified folders.\n-o::\n  Run only once.\n-q::\n  Run only quick synchronizations.\n-u <UI>::\n  Specifies an alternative user interface to use.\n  Possible interface choices are: quiet, basic, syslog, ttyui, blinkenlights, machineui.\n"
      }
    ],
    "field": [
      {
        "id": "accounts",
        "label": "Accounts",
        "description": "Comma-separated account names; overrides the config file.",
        "type": "string",
        "option": [
          "-a"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "folders",
        "label": "Only these folders",
        "description": "Comma-separated remote folder names.",
        "type": "string",
        "option": [
          "-f"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "config",
        "label": "Configuration file",
        "type": "path",
        "option": [
          "-c"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "once",
        "label": "Run only once",
        "description": "Ignore autorefresh in the config.",
        "type": "boolean",
        "option": [
          "-o"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "quick",
        "label": "Quick sync",
        "description": "Skips flag updates on the IMAP server.",
        "type": "boolean",
        "option": [
          "-q"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "dry_run",
        "label": "Dry run",
        "type": "boolean",
        "option": [
          "--dry-run"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "single_thread",
        "label": "Single thread",
        "type": "boolean",
        "option": [
          "-1"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "ui",
        "label": "User interface",
        "type": "enum",
        "option": [
          "-u"
        ],
        "choices": [
          {
            "value": "quiet",
            "label": "quiet"
          },
          {
            "value": "basic",
            "label": "basic"
          },
          {
            "value": "syslog",
            "label": "syslog"
          },
          {
            "value": "ttyui",
            "label": "ttyui"
          },
          {
            "value": "blinkenlights",
            "label": "blinkenlights"
          },
          {
            "value": "machineui",
            "label": "machineui"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "logfile",
        "label": "Log file",
        "type": "path",
        "option": [
          "-l"
        ],
        "path": {
          "kind": "file",
          "role": "output",
          "must_exist": false
        },
        "effect": "overwrite",
        "sources": [
          "man"
        ]
      },
      {
        "id": "info",
        "label": "Show repository info only",
        "type": "boolean",
        "option": [
          "--info"
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "sync_once",
        "label": "Sync once",
        "fields": [
          "accounts",
          "once",
          "quick",
          "config"
        ],
        "required": [],
        "set": {
          "once": [
            true
          ]
        }
      },
      {
        "id": "preview",
        "label": "Preview (dry run)",
        "fields": [
          "accounts",
          "dry_run",
          "once",
          "config"
        ],
        "required": [
          "dry_run"
        ],
        "set": {
          "dry_run": [
            true
          ],
          "once": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "accounts",
          "folders",
          "config",
          "once",
          "quick",
          "dry_run"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "single_thread",
          "ui",
          "logfile",
          "info"
        ]
      }
    ]
  }
}
