- Python 100%
Writes per-game metadata.json + images (logo/background/icon) alongside downloads, plus a library.json index so a UI can render a library grid from one file fetch. |
||
|---|---|---|
| gog_downloader | ||
| .gitignore | ||
| pyproject.toml | ||
| README.md | ||
gog-downloader
A small CLI that logs in to your GOG.com account and downloads games you own.
It uses the same login flow as GOG Galaxy (OAuth2 against auth.gog.com), then
walks your library via embed.gog.com / api.gog.com to fetch installers
(and optionally DLC and bonus content).
Install
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
This installs the gog-dl command.
Usage
1. Log in (opens your browser, then asks you to paste the redirect URL back):
gog-dl login
Your tokens are saved to ~/.config/gog-downloader/tokens.json (readable only
by you) and refreshed automatically on later runs.
2. See what you own:
gog-dl list
3. Download:
# Everything, Windows installers only (the default)
gog-dl download --all
# Just a couple of games
gog-dl download --game "Witcher" --game "Stardew"
# Include DLC and bonus content (soundtracks, artbooks, ...)
gog-dl download --all --dlc --bonus
# Multiple OS builds
gog-dl download --all --os windows,linux,mac
# Preview without downloading anything
gog-dl download --all --dry-run
# Custom destination (default: ./gog-downloads)
gog-dl download --all --output /Volumes/Backup/gog
# Throttle to 10 MB/s
gog-dl download --all --rate-limit 10M
# Re-download everything even if already present on disk
gog-dl download --all --force
Downloads are idempotent by default: files already present on disk with the
expected size are skipped, and interrupted downloads resume automatically
(falling back to a full re-download if the server doesn't support range
requests, rather than corrupting the partial file). Pass --force to
re-download regardless. Where GOG provides a checksum, it's verified after
download and a warning is printed on mismatch.
4. Fetch metadata for a web UI (title, description, cover art):
gog-dl metadata --all
Writes metadata.json and an images/ folder (logo, background, icon) next to
each game's downloads under --output (default ./gog-downloads), plus a
library.json index at the top of that folder listing every game with paths
to its metadata and images — enough for a static site or small web app to
render a library grid without crawling per-game folders. Accepts the same
--game filters as download, and --force to re-fetch.
Notes
- This only accesses games tied to your own GOG account via your own login session - there's no bypass of any access control, DRM, or paywall involved.
- GOG doesn't publish a formal third-party API, so these endpoints are the same ones GOG Galaxy itself uses; they could change without notice.