{
  "id": "nmail",
  "name": "nmail",
  "homepage": "https://github.com/d99kris/nmail",
  "description": "Terminal-based email client for Linux and macOS.",
  "executables": [
    "nmail"
  ],
  "platforms": [
    "macos",
    "linux"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/nmail/main.conf",
      "[configHome]/nmail/ui.conf",
      "[configHome]/nmail/key.conf",
      "[configHome]/nmail/colors.conf",
      "[configHome]/nmail/signature.txt",
      "[configHome]/nmail/signature.html"
    ],
    "exclude": [],
    "secret": [
      "[configHome]/nmail/auth.conf",
      "[configHome]/nmail/secret.conf"
    ]
  },
  "commands": {
    "format": 1,
    "label": "Run nmail",
    "description": "Start nmail with a few common startup options. Cache encryption, key dump, password change and read-only shadow mode are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "readme",
        "kind": "help",
        "url": "https://raw.githubusercontent.com/d99kris/nmail/HEAD/README.md",
        "revision": "2026-10-27",
        "evidence": "    -d, --confdir <DIR>\n        use a different directory than ~/.config/nmail\n\n    -e, --verbose\n        enable verbose logging\n\n    -o, --offline\n        run in offline mode\n\n    -s, --setup <SERV>\n        setup wizard for specified service, supported services: gmail,\n        gmail-oauth2, icloud, outlook, outlook-oauth2\n\n    -x, --export <DIR>\n        export cache to specified dir in Maildir format\n"
      }
    ],
    "field": [
      {
        "id": "confdir",
        "label": "Config directory",
        "description": "Use a different directory than ~/.config/nmail.",
        "type": "path",
        "option": [
          "--confdir",
          "-d"
        ],
        "path": {
          "kind": "directory",
          "role": "input"
        },
        "sources": [
          "readme"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose logging",
        "type": "boolean",
        "option": [
          "--verbose",
          "-e"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "offline",
        "label": "Offline mode",
        "type": "boolean",
        "option": [
          "--offline",
          "-o"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "setup",
        "label": "Setup wizard for service",
        "type": "enum",
        "option": [
          "--setup",
          "-s"
        ],
        "choices": [
          {
            "value": "gmail",
            "label": "Gmail"
          },
          {
            "value": "gmail-oauth2",
            "label": "Gmail (OAuth2)"
          },
          {
            "value": "icloud",
            "label": "iCloud"
          },
          {
            "value": "outlook",
            "label": "Outlook"
          },
          {
            "value": "outlook-oauth2",
            "label": "Outlook (OAuth2)"
          }
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "export",
        "label": "Export cache to Maildir",
        "type": "path",
        "option": [
          "--export",
          "-x"
        ],
        "path": {
          "kind": "directory",
          "role": "output"
        },
        "effect": "overwrite",
        "sources": [
          "readme"
        ]
      }
    ],
    "task": [
      {
        "id": "setup",
        "label": "Set up an account",
        "fields": [
          "setup"
        ],
        "required": [
          "setup"
        ]
      },
      {
        "id": "offline",
        "label": "Read offline",
        "fields": [
          "offline"
        ],
        "required": [],
        "set": {
          "offline": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "setup",
          "offline",
          "verbose"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "confdir",
          "export"
        ]
      }
    ]
  }
}
