{
  "id": "himalaya",
  "name": "Himalaya",
  "homepage": "https://github.com/pimalaya/himalaya",
  "description": "CLI to manage emails.",
  "executables": [
    "himalaya"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/himalaya/config.toml",
      "~/.config/himalaya/config.toml"
    ],
    "secret": [
      "~/.himalayarc"
    ],
    "secret_paths": [
      {
        "file": [
          "[configHome]/himalaya/config.toml",
          "~/.config/himalaya/config.toml"
        ],
        "format": "toml",
        "match": {
          "key_path": [
            "accounts.*.imap.sasl.plain.password.raw",
            "accounts.*.imap.sasl.login.password.raw",
            "accounts.*.imap.sasl.oauthbearer.token.raw",
            "accounts.*.imap.sasl.xoauth2.token.raw",
            "accounts.*.imap.sasl.scram-sha-256.password.raw",
            "accounts.*.smtp.sasl.plain.password.raw",
            "accounts.*.smtp.sasl.login.password.raw",
            "accounts.*.smtp.sasl.oauthbearer.token.raw",
            "accounts.*.smtp.sasl.xoauth2.token.raw",
            "accounts.*.smtp.sasl.scram-sha-256.password.raw",
            "accounts.*.jmap.auth.header.raw",
            "accounts.*.jmap.auth.bearer.token.raw",
            "accounts.*.jmap.auth.basic.password.raw",
            "accounts.*.gmail.auth.token.raw",
            "accounts.*.msgraph.auth.token.raw"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Himalaya",
    "description": "List envelopes with himalaya envelope list. Other subcommands and protocol-specific APIs are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "envelope",
          "list"
        ],
        "label": "List envelopes",
        "source": [
          {
            "id": "readme",
            "kind": "manual",
            "url": "https://raw.githubusercontent.com/pimalaya/himalaya/HEAD/README.md",
            "revision": "2026-10-27",
            "evidence": "Backend-agnostic commands run on the account's first configured backend, or the one picked with `-b/--backend`. `-m/--mailbox` takes a mailbox id, name, alias or role (`inbox`, `sent`, `drafts`, `trash`...), and defaults to the inbox.\nhimalaya envelope list --page 2"
          }
        ],
        "field": [
          {
            "id": "mailbox",
            "label": "Mailbox",
            "description": "Id, name, alias or role; defaults to the inbox.",
            "type": "string",
            "option": [
              "--mailbox",
              "-m"
            ],
            "suggestions": [
              {
                "value": "inbox",
                "label": "Inbox"
              },
              {
                "value": "sent",
                "label": "Sent"
              },
              {
                "value": "drafts",
                "label": "Drafts"
              },
              {
                "value": "trash",
                "label": "Trash"
              }
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "backend",
            "label": "Backend",
            "type": "string",
            "option": [
              "--backend",
              "-b"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "page",
            "label": "Page",
            "type": "integer",
            "option": [
              "--page"
            ],
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "list",
            "label": "List a mailbox",
            "fields": [
              "mailbox",
              "page"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "mailbox",
              "page",
              "backend"
            ]
          }
        ]
      }
    ]
  }
}
