{
  "id": "imapfilter",
  "name": "IMAPFilter",
  "homepage": "https://github.com/lefcha/imapfilter",
  "description": "Mail filtering utility for IMAP servers.",
  "executables": [
    "imapfilter"
  ],
  "dotfiles": {
    "paths": [],
    "secret": [
      "~/.imapfilter/config.lua"
    ],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Run mail filters",
    "description": "Run an IMAPFilter configuration, optionally as a dry run. Debug and pid files, interactive mode and one-line commands are outside this form.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://github.com/lefcha/imapfilter/blob/master/doc/imapfilter.1",
        "revision": "2026-10-27",
        "evidence": "imapfilter [-inVv] [-c configfile] [-d debugfile] [-e 'command'] [-l logfile] [-p pidfile] [-t truststore]\n-c configfile  Path to the configuration file to read. The default is $HOME/.imapfilter/config.lua.\n-l logfile     File that contains logs of error messages produced.\n-n  This option enables the so called dry-run mode, and any actions that would result in changes to the server do not actually take place.\n-t truststore  The path to the system's SSL CA TrustStore directory or file.\n-v  Verbose\n"
      }
    ],
    "field": [
      {
        "id": "config",
        "label": "Configuration file",
        "description": "Defaults to ~/.imapfilter/config.lua.",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "input"
        },
        "option": [
          "-c"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "dry_run",
        "label": "Dry run",
        "description": "Do not send requests that would modify data on the server.",
        "type": "boolean",
        "option": [
          "-n"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "log",
        "label": "Log file",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "output"
        },
        "option": [
          "-l"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "truststore",
        "label": "CA truststore",
        "type": "path",
        "path": {
          "kind": "any",
          "role": "input"
        },
        "option": [
          "-t"
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "dry_run_task",
        "label": "Test a configuration (dry run)",
        "fields": [
          "config",
          "dry_run"
        ],
        "required": [
          "config"
        ],
        "set": {
          "dry_run": [
            true
          ]
        }
      },
      {
        "id": "run",
        "label": "Run a configuration",
        "fields": [
          "config",
          "log"
        ],
        "required": [
          "config"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "config",
          "dry_run",
          "log"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "truststore"
        ]
      }
    ]
  }
}
