{
  "id": "nzbget",
  "name": "NZBGet",
  "homepage": "https://nzbget.com/",
  "description": "A binary downloader for Usenet.",
  "executables": [
    "nzbget"
  ],
  "dotfiles": {
    "paths": [],
    "secret": [
      "~/.nzbget",
      "~/.config/nzbget.conf",
      "~/.config/nzbget/nzbget.conf",
      "~/Library/Application Support/NZBGet/nzbget.conf"
    ]
  },
  "commands": {
    "format": 1,
    "label": "Run or control NZBGet",
    "description": "Start the server, or send a client request (queue an NZB, set rate, pause, scan, quit) to a running server. List/edit/log switches that take optional sub-values are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "manual",
        "url": "https://manpages.debian.org/bookworm/nzbget/nzbget.1.en.html",
        "revision": "21.0+dfsg-2.1",
        "evidence": "  -c, --configfile <file>   Filename of configuration-file\n  -n, --noconfigfile        Prevent loading of configuration-file (required options must be passed with --option)\n  -s, --server              Start nzbget as a server in console-mode\n  -D, --daemon              Start nzbget as a server in daemon-mode\n  -Q, --quit                Shutdown server\n  -A, --append <nzb-file>   Send file to server's download queue\n  -C, --connect             Attach client to server\n  -R, --rate <speed>        Set download rate on server, in KB/s\n  -T, --top                 Add file to the top (beginning) of queue (for using with switch --append)\n  -K, --category <name>     Assign category to nzb-file (for using with switch --append)\n  -S, --scan                Scan incoming nzb-directory on server\n  -p, --printconfig         Print configuration and exit\n"
      }
    ],
    "field": [
      {
        "id": "configfile",
        "label": "Configuration file",
        "type": "path",
        "option": [
          "--configfile",
          "-c"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "help"
        ]
      },
      {
        "id": "server",
        "label": "Start server (console mode)",
        "type": "boolean",
        "option": [
          "--server",
          "-s"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "daemon",
        "label": "Start server (daemon mode)",
        "type": "boolean",
        "option": [
          "--daemon",
          "-D"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "append",
        "label": "NZB file to queue",
        "description": "Sends the file to the server's download queue.",
        "type": "path",
        "option": [
          "--append",
          "-A"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "help"
        ]
      },
      {
        "id": "category",
        "label": "Category",
        "description": "Used together with a queued NZB.",
        "type": "string",
        "option": [
          "--category",
          "-K"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "top",
        "label": "Add to top of queue",
        "type": "boolean",
        "option": [
          "--top",
          "-T"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "rate",
        "label": "Download rate limit (KB/s)",
        "type": "integer",
        "option": [
          "--rate",
          "-R"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "scan",
        "label": "Scan incoming NZB directory",
        "type": "boolean",
        "option": [
          "--scan",
          "-S"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "printconfig",
        "label": "Print configuration and exit",
        "type": "boolean",
        "option": [
          "--printconfig",
          "-p"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "quit",
        "label": "Shut down server",
        "type": "boolean",
        "option": [
          "--quit",
          "-Q"
        ],
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "add_nzb",
        "label": "Queue an NZB",
        "fields": [
          "append",
          "category",
          "top",
          "configfile"
        ],
        "required": [
          "append"
        ]
      },
      {
        "id": "serve",
        "label": "Start server in console",
        "fields": [
          "server",
          "configfile"
        ],
        "required": [
          "server"
        ],
        "set": {
          "server": [
            true
          ]
        }
      },
      {
        "id": "daemon",
        "label": "Start server as daemon",
        "fields": [
          "daemon",
          "configfile"
        ],
        "required": [
          "daemon"
        ],
        "set": {
          "daemon": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "configfile",
          "server",
          "daemon",
          "append",
          "category",
          "top"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "rate",
          "scan",
          "printconfig",
          "quit"
        ]
      }
    ]
  }
}
