{
  "id": "rtorrent",
  "name": "rTorrent",
  "homepage": "https://github.com/rakshasa/rtorrent",
  "description": "A ncurses-based command line torrent client for high performance.",
  "executables": [
    "rtorrent"
  ],
  "platforms": [
    "macos",
    "linux"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/rtorrent/rtorrent.rc",
      "~/.rtorrent.rc"
    ],
    "exclude": [],
    "secret": [],
    "machine_lines": [
      {
        "file": [
          "[configHome]/rtorrent/rtorrent.rc",
          "~/.rtorrent.rc"
        ],
        "scope": "backup",
        "match": {
          "prefix": [
            "session.path.set",
            "directory.default.set",
            "network.listen.port.range.set",
            "network.scgi.open_local",
            "session ",
            "directory ",
            "port_range "
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Start rTorrent",
    "description": "Start rTorrent with torrent files or URLs, a download directory and session directory. The -o/-O setting overrides are left out.",
    "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://manpages.debian.org/bookworm/rtorrent/rtorrent.1.en.html",
        "revision": "0.9.8-1",
        "evidence": "rtorrent [ -h ] [ -n ] [ -o key1=opt1,... ] [ -O key=opt ] [ URL | FILE ... ]\n-b a.b.c.d  Bind listening socket and outgoing connections to this network interface address.\n-d directory  Set the default download directory. Defaults to \"./\".\n-i a.b.c.d  Set the address reported to the tracker.\n-n  Don't load ~/.rtorrent.rc on startup.\n-p a-b  Try to open a listening port in the range a up to and including b.\n-s directory  Session management will be enabled and the torrent files for all open downloads will be stored in this directory.\n"
      }
    ],
    "field": [
      {
        "id": "sources",
        "label": "Torrent files or URLs",
        "type": "string",
        "position": 0,
        "multiple": true,
        "min": 0,
        "sources": [
          "man"
        ]
      },
      {
        "id": "directory",
        "label": "Download directory",
        "type": "path",
        "option": [
          "-d"
        ],
        "path": {
          "kind": "directory",
          "role": "output"
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "session",
        "label": "Session directory",
        "description": "Stores torrent files for all open downloads so they resume on restart.",
        "type": "path",
        "option": [
          "-s"
        ],
        "path": {
          "kind": "directory",
          "role": "output"
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "port_range",
        "label": "Listening port range",
        "description": "For example 6881-6889.",
        "type": "string",
        "option": [
          "-p"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "bind",
        "label": "Bind address",
        "type": "string",
        "option": [
          "-b"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "report_ip",
        "label": "Address reported to tracker",
        "type": "string",
        "option": [
          "-i"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "no_rc",
        "label": "Skip ~/.rtorrent.rc",
        "type": "boolean",
        "option": [
          "-n"
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "download",
        "label": "Download torrents",
        "fields": [
          "sources",
          "directory",
          "session",
          "port_range"
        ],
        "required": [
          "sources"
        ]
      },
      {
        "id": "clean",
        "label": "Start without rc file",
        "set": {
          "no_rc": [
            true
          ]
        },
        "lock": [
          "no_rc"
        ],
        "fields": [
          "sources",
          "directory",
          "no_rc"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "sources",
          "directory",
          "session",
          "port_range"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "bind",
          "report_ip",
          "no_rc"
        ]
      }
    ]
  }
}
