{
  "id": "lgogdownloader",
  "name": "LGOGDownloader",
  "homepage": "https://github.com/Sude-/lgogdownloader",
  "description": "An open-source GOG.com downloader for Linux users.",
  "executables": [
    "lgogdownloader"
  ],
  "platforms": [
    "macos",
    "linux"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/lgogdownloader/config.cfg",
      "[configHome]/lgogdownloader/blacklist.txt",
      "[configHome]/lgogdownloader/ignorelist.txt",
      "[configHome]/lgogdownloader/transformations.json"
    ],
    "exclude": [],
    "secret": [
      "[configHome]/lgogdownloader/cookies.txt",
      "[configHome]/lgogdownloader/galaxy_tokens.json"
    ]
  },
  "commands": {
    "format": 1,
    "label": "Download GOG games",
    "description": "Log in to GOG, then download or repair installers for games matching a regular expression, for chosen platforms and languages. Listing, Galaxy, cloud-save and XML options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://manpages.debian.org/unstable/lgogdownloader/lgogdownloader.1.en.html",
        "revision": "2026-10",
        "evidence": "--login Login\n--download Download\n--repair Repair downloaded files Use --repair --download to redownload files when filesizes don't match\n--game arg Set regular expression filter for download/list/repair (Perl syntax).\n--updated List/download only games with update flag set\n--directory arg (=.) Set download directory\n--limit-rate arg (=0) Limit download rate to value in kB\n--platform arg (=w+l) Select which installers are downloaded\nWindows = w|win|windows\nMac = m|mac|osx\nLinux = l|lin|linux\n--language arg (=en) Select which language installers are downloaded\n--threads arg (=4) Number of download threads\n"
      }
    ],
    "field": [
      {
        "id": "login",
        "label": "Log in",
        "type": "boolean",
        "option": [
          "--login"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "download",
        "label": "Download",
        "type": "boolean",
        "option": [
          "--download"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "repair",
        "label": "Repair downloaded files",
        "description": "With --download, re-downloads files whose size does not match; the old file is renamed with .old appended.",
        "type": "boolean",
        "option": [
          "--repair"
        ],
        "effect": "overwrite",
        "sources": [
          "man"
        ]
      },
      {
        "id": "game",
        "label": "Game filter (regex)",
        "description": "Perl-syntax regular expression matched against game names.",
        "type": "string",
        "option": [
          "--game"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "updated",
        "label": "Only updated games",
        "type": "boolean",
        "option": [
          "--updated"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "directory",
        "label": "Download directory",
        "type": "path",
        "option": [
          "--directory"
        ],
        "path": {
          "kind": "directory",
          "role": "output",
          "must_exist": false
        },
        "observed_default": ".",
        "sources": [
          "man"
        ]
      },
      {
        "id": "platform",
        "label": "Platforms",
        "description": "w = Windows, m = Mac, l = Linux. Separate by comma for priority, plus to combine, e.g. l,w+m.",
        "type": "string",
        "option": [
          "--platform"
        ],
        "suggestions": [
          {
            "value": "w+l",
            "label": "Windows and Linux"
          },
          {
            "value": "l",
            "label": "Linux"
          },
          {
            "value": "w",
            "label": "Windows"
          },
          {
            "value": "m",
            "label": "Mac"
          },
          {
            "value": "all",
            "label": "All"
          }
        ],
        "observed_default": "w+l",
        "sources": [
          "man"
        ]
      },
      {
        "id": "language",
        "label": "Languages",
        "type": "string",
        "option": [
          "--language"
        ],
        "suggestions": [
          {
            "value": "en",
            "label": "English"
          },
          {
            "value": "all",
            "label": "All languages"
          }
        ],
        "observed_default": "en",
        "sources": [
          "man"
        ]
      },
      {
        "id": "limit_rate",
        "label": "Rate limit (kB)",
        "description": "0 means unlimited.",
        "type": "integer",
        "option": [
          "--limit-rate"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "threads",
        "label": "Download threads",
        "type": "integer",
        "option": [
          "--threads"
        ],
        "observed_default": "4",
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "login_only",
        "label": "Log in",
        "fields": [
          "login"
        ],
        "required": [
          "login"
        ],
        "set": {
          "login": [
            true
          ]
        }
      },
      {
        "id": "download_games",
        "label": "Download matching games",
        "fields": [
          "download",
          "game",
          "directory",
          "platform",
          "language",
          "threads"
        ],
        "required": [
          "download"
        ],
        "set": {
          "download": [
            true
          ]
        }
      },
      {
        "id": "repair_games",
        "label": "Repair downloads",
        "fields": [
          "download",
          "repair",
          "game",
          "directory"
        ],
        "required": [
          "download",
          "repair"
        ],
        "set": {
          "download": [
            true
          ],
          "repair": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "login",
          "download",
          "game",
          "directory",
          "platform",
          "language"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "repair",
          "updated",
          "limit_rate",
          "threads"
        ]
      }
    ]
  }
}
