{
  "id": "notmuch",
  "name": "Notmuch",
  "homepage": "https://notmuchmail.org",
  "description": "A command-line based program for indexing, searching, reading, and tagging large collections of email messages.",
  "executables": [
    "notmuch"
  ],
  "dotfiles": {
    "paths": [
      "~/.notmuch-config",
      "~/.notmuch-config.*",
      "[configHome]/notmuch/default/config",
      "[configHome]/notmuch/*/config"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "notmuch",
    "description": "Search the mail index and list matching threads. Other notmuch subcommands are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "search"
        ],
        "label": "Search mail",
        "description": "Search for messages matching the given search terms and display the threads containing them.",
        "source": [
          {
            "id": "man",
            "kind": "manual",
            "url": "https://manpages.debian.org/unstable/notmuch/notmuch-search.1.en.html",
            "revision": "0.40-2",
            "evidence": "notmuch search [option ...] <search-term> ...\n--format=(json|sexp|text|text0)\n--output=(summary|threads|messages|files|tags)\n--sort=(newest-first|oldest-first)\n--offset=[-]N\n--limit=N\n--exclude=(true|false|all|flag)"
          }
        ],
        "field": [
          {
            "id": "terms",
            "label": "Search terms",
            "description": "Example: tag:unread and date:today..",
            "type": "string",
            "position": 0,
            "multiple": true,
            "sources": [
              "man"
            ]
          },
          {
            "id": "output",
            "label": "Output",
            "type": "enum",
            "option": [
              "--output"
            ],
            "value_style": "equals",
            "choices": [
              {
                "value": "summary",
                "label": "Summary"
              },
              {
                "value": "threads",
                "label": "Thread IDs"
              },
              {
                "value": "messages",
                "label": "Message IDs"
              },
              {
                "value": "files",
                "label": "File names"
              },
              {
                "value": "tags",
                "label": "Tags"
              }
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "format",
            "label": "Format",
            "type": "enum",
            "option": [
              "--format"
            ],
            "value_style": "equals",
            "choices": [
              {
                "value": "text",
                "label": "Text"
              },
              {
                "value": "json",
                "label": "JSON"
              },
              {
                "value": "sexp",
                "label": "S-expression"
              },
              {
                "value": "text0",
                "label": "NUL-separated text"
              }
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "sort",
            "label": "Sort",
            "type": "enum",
            "option": [
              "--sort"
            ],
            "value_style": "equals",
            "choices": [
              {
                "value": "newest-first",
                "label": "Newest first"
              },
              {
                "value": "oldest-first",
                "label": "Oldest first"
              }
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "limit",
            "label": "Limit results",
            "type": "integer",
            "option": [
              "--limit"
            ],
            "value_style": "equals",
            "sources": [
              "man"
            ]
          },
          {
            "id": "offset",
            "label": "Skip first results",
            "type": "integer",
            "option": [
              "--offset"
            ],
            "value_style": "equals",
            "sources": [
              "man"
            ]
          },
          {
            "id": "exclude",
            "label": "Excluded tags",
            "type": "enum",
            "option": [
              "--exclude"
            ],
            "value_style": "equals",
            "choices": [
              {
                "value": "true",
                "label": "Prevent excluded messages from matching"
              },
              {
                "value": "false",
                "label": "Allow excluded messages"
              },
              {
                "value": "all",
                "label": "Hide excluded messages entirely"
              },
              {
                "value": "flag",
                "label": "Flag excluded messages"
              }
            ],
            "sources": [
              "man"
            ]
          }
        ],
        "task": [
          {
            "id": "search",
            "label": "Search threads",
            "fields": [
              "terms",
              "sort",
              "limit"
            ],
            "required": [
              "terms"
            ]
          },
          {
            "id": "message_ids",
            "label": "List message IDs",
            "fields": [
              "terms",
              "limit"
            ],
            "required": [
              "terms"
            ],
            "set": {
              "output": [
                "messages"
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "terms",
              "output",
              "sort",
              "limit"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "format",
              "offset",
              "exclude"
            ]
          }
        ]
      }
    ]
  }
}
