{
  "id": "streamlink",
  "name": "Streamlink",
  "homepage": "https://streamlink.github.io",
  "description": "A command-line utility that extracts streams from various services and pipes them into a video player of choice.",
  "executables": [
    "streamlink"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/streamlink/config",
      "[configHome]/streamlink/config.*",
      "[appData]/streamlink/config",
      "[appData]/streamlink/config.*",
      "~/.streamlinkrc",
      "%APPDATA%/streamlink/streamlinkrc"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Play or record a stream",
    "description": "Open a live-stream URL in a player or save it to a file. Plugin credentials, HLS/DASH tuning and proxy options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "docs",
        "kind": "manual",
        "url": "https://streamlink.github.io/cli.html",
        "revision": "8.6.2",
        "evidence": "-l LEVEL\n--loglevel LEVEL\nnone, critical, error, warning, info, debug, trace, all\n-p PATH\n--player PATH\n-t TITLE\n--title TITLE\n-O\n--stdout\n-o FILENAME\n--output FILENAME\n-r FILENAME\n--record FILENAME\n-f\n--force\nWhen using --output or --record, always write to file even if it already exists (overwrite).\n--stream-url\nstreamlink -p mpv --title \"{author} - {category} - {title}\" <URL> [STREAM]\nUse best or worst for selecting the highest or lowest available quality.\n"
      }
    ],
    "field": [
      {
        "id": "url",
        "label": "Stream URL",
        "type": "url",
        "position": 0,
        "min": 1,
        "sources": [
          "docs"
        ]
      },
      {
        "id": "stream",
        "label": "Quality",
        "description": "A stream name such as best or worst, or a comma-separated fallback list.",
        "type": "string",
        "position": 1,
        "suggestions": [
          {
            "value": "best",
            "label": "Best"
          },
          {
            "value": "worst",
            "label": "Worst"
          },
          {
            "value": "720p,480p,best",
            "label": "720p, then 480p, then best"
          }
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "player",
        "label": "Player executable",
        "type": "string",
        "option": [
          "--player",
          "-p"
        ],
        "suggestions": [
          {
            "value": "mpv",
            "label": "mpv"
          },
          {
            "value": "vlc",
            "label": "VLC"
          }
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "title",
        "label": "Player window title",
        "type": "string",
        "option": [
          "--title",
          "-t"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "output",
        "label": "Save to file",
        "type": "path",
        "option": [
          "--output",
          "-o"
        ],
        "path": {
          "kind": "file",
          "role": "output"
        },
        "sources": [
          "docs"
        ]
      },
      {
        "id": "record",
        "label": "Record while playing",
        "type": "path",
        "option": [
          "--record",
          "-r"
        ],
        "path": {
          "kind": "file",
          "role": "output"
        },
        "sources": [
          "docs"
        ]
      },
      {
        "id": "force",
        "label": "Overwrite existing file",
        "type": "boolean",
        "option": [
          "--force",
          "-f"
        ],
        "effect": "overwrite",
        "sources": [
          "docs"
        ]
      },
      {
        "id": "stdout",
        "label": "Write to stdout",
        "type": "boolean",
        "option": [
          "--stdout",
          "-O"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "stream_url",
        "label": "Only print stream URL",
        "type": "boolean",
        "option": [
          "--stream-url"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "loglevel",
        "label": "Log level",
        "type": "enum",
        "option": [
          "--loglevel",
          "-l"
        ],
        "choices": [
          {
            "value": "none",
            "label": "None"
          },
          {
            "value": "critical",
            "label": "Critical"
          },
          {
            "value": "error",
            "label": "Error"
          },
          {
            "value": "warning",
            "label": "Warning"
          },
          {
            "value": "info",
            "label": "Info"
          },
          {
            "value": "debug",
            "label": "Debug"
          },
          {
            "value": "trace",
            "label": "Trace"
          },
          {
            "value": "all",
            "label": "All"
          }
        ],
        "sources": [
          "docs"
        ]
      }
    ],
    "task": [
      {
        "id": "play",
        "label": "Play in player",
        "fields": [
          "url",
          "stream",
          "player",
          "title"
        ],
        "required": [
          "url"
        ]
      },
      {
        "id": "save",
        "label": "Save to file",
        "fields": [
          "url",
          "stream",
          "output",
          "force"
        ],
        "required": [
          "url",
          "output"
        ]
      },
      {
        "id": "print-url",
        "label": "Print stream URL",
        "fields": [
          "url",
          "stream",
          "stream_url"
        ],
        "required": [
          "url"
        ],
        "set": {
          "stream_url": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "url",
          "stream",
          "player",
          "output"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "title",
          "record",
          "force",
          "stdout",
          "stream_url",
          "loglevel"
        ]
      }
    ]
  }
}
