{
  "id": "gallery-dl",
  "name": "gallery-dl",
  "homepage": "https://github.com/mikf/gallery-dl",
  "description": "A command-line program to download image galleries and collections.",
  "executables": [
    "gallery-dl"
  ],
  "dotfiles": {
    "paths": [],
    "secret": [
      "~/.config/gallery-dl/config.json",
      "~/.gallery-dl.conf",
      "%APPDATA%/gallery-dl/config.json",
      "%USERPROFILE%/gallery-dl/config.json",
      "%USERPROFILE%/gallery-dl.conf"
    ],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Download galleries",
    "description": "Download images and collections from one or more URLs, or list what would be fetched. Authentication, post-processing and update options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "url": "https://github.com/mikf/gallery-dl/blob/master/docs/options.md",
        "revision": "master 2026-10",
        "evidence": "    -f, --filename FORMAT       Filename format string for downloaded files\n    -d, --destination PATH      Target location for file downloads\n    -D, --directory PATH        Exact location for file downloads\n    -i, --input-file FILE       Download URLs found in FILE ('-' for stdin).\n    -q, --quiet                 Activate quiet mode\n    -v, --verbose               Print various debugging information\n    -g, --get-urls              Print URLs instead of downloading\n    -j, --dump-json             Print JSON information\n    -s, --simulate              Simulate data extraction; do not download\n    -R, --retries N             Maximum number of retries for failed HTTP\n    -r, --limit-rate RATE       Maximum download rate (e.g. 500k, 2.5M, or\n    --no-skip                   Do not skip downloads; overwrite existing files\n    --sleep SECONDS             Number of seconds to wait before each download.\n    -C, --cookies FILE          File to load additional cookies from\n    --download-archive FILE     Record successfully downloaded files in FILE\n    --range RANGE               Index range(s) specifying which files to\n"
      }
    ],
    "field": [
      {
        "id": "urls",
        "label": "URLs",
        "type": "url",
        "position": 0,
        "multiple": true,
        "min": 0,
        "sources": [
          "help"
        ]
      },
      {
        "id": "destination",
        "label": "Destination",
        "description": "Target location for downloads.",
        "type": "path",
        "option": [
          "--destination",
          "-d"
        ],
        "path": {
          "kind": "directory",
          "role": "output"
        },
        "sources": [
          "help"
        ]
      },
      {
        "id": "input_file",
        "label": "URL list file",
        "type": "path",
        "option": [
          "--input-file",
          "-i"
        ],
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "help"
        ]
      },
      {
        "id": "filename",
        "label": "Filename format",
        "type": "string",
        "option": [
          "--filename",
          "-f"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "range",
        "label": "File range",
        "type": "string",
        "option": [
          "--range"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "download_archive",
        "label": "Download archive file",
        "description": "Record downloaded files and skip any already recorded.",
        "type": "path",
        "option": [
          "--download-archive"
        ],
        "path": {
          "kind": "file",
          "role": "output"
        },
        "sources": [
          "help"
        ]
      },
      {
        "id": "cookies",
        "label": "Cookies file",
        "type": "path",
        "option": [
          "--cookies",
          "-C"
        ],
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "help"
        ]
      },
      {
        "id": "limit_rate",
        "label": "Rate limit",
        "type": "string",
        "option": [
          "--limit-rate",
          "-r"
        ],
        "suggestions": [
          {
            "value": "500k",
            "label": "500k"
          },
          {
            "value": "2.5M",
            "label": "2.5M"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "sleep",
        "label": "Sleep before each download (seconds)",
        "type": "number",
        "option": [
          "--sleep"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "retries",
        "label": "Retries",
        "type": "integer",
        "option": [
          "--retries",
          "-R"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "get_urls",
        "label": "Print URLs only",
        "type": "boolean",
        "option": [
          "--get-urls",
          "-g"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "dump_json",
        "label": "Dump JSON info",
        "type": "boolean",
        "option": [
          "--dump-json",
          "-j"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "simulate",
        "label": "Simulate",
        "type": "boolean",
        "option": [
          "--simulate",
          "-s"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "no_skip",
        "label": "Overwrite existing files",
        "type": "boolean",
        "option": [
          "--no-skip"
        ],
        "effect": "overwrite",
        "sources": [
          "help"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose",
        "type": "boolean",
        "option": [
          "--verbose",
          "-v"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "quiet",
        "label": "Quiet",
        "type": "boolean",
        "option": [
          "--quiet",
          "-q"
        ],
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "download",
        "label": "Download URLs",
        "fields": [
          "urls",
          "destination",
          "filename",
          "range",
          "download_archive",
          "limit_rate",
          "sleep",
          "verbose"
        ],
        "required": [
          "urls"
        ]
      },
      {
        "id": "list-urls",
        "label": "List URLs without downloading",
        "set": {
          "get_urls": [
            true
          ]
        },
        "lock": [
          "get_urls"
        ],
        "fields": [
          "urls",
          "get_urls",
          "range",
          "cookies"
        ],
        "required": [
          "urls"
        ]
      },
      {
        "id": "from-file",
        "label": "Download from a URL list",
        "fields": [
          "input_file",
          "destination",
          "download_archive",
          "limit_rate",
          "sleep"
        ],
        "required": [
          "input_file"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "urls",
          "destination",
          "input_file",
          "filename",
          "range",
          "get_urls",
          "simulate"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "download_archive",
          "cookies",
          "limit_rate",
          "sleep",
          "retries",
          "dump_json",
          "no_skip",
          "verbose",
          "quiet"
        ]
      }
    ]
  }
}
