Skip to main content

gog-cli

CI PyPI Python License: MIT Ruff

gog is a Python CLI for backing up a user's owned DRM-free GOG game library.

It is focused on safe, scriptable workflows:

  • list owned games with filtering and fuzzy search
  • plan and execute backups to a local directory
  • preserve metadata needed to audit and restore backups
  • download installers and related files with resumable behavior
  • verify downloaded files when checksums are available

It's also comfortable as a quick, interactive tool:

gog list                    # your purchased library
gog list civilization       # fuzzy title search
gog search "baldurs gate"   # public catalog, with an "owned" column
gog dl "civilization iv"    # download by name or id in the current directory
gog dl 1760534591 --win     # unambiguous by id, Windows files only
gog help dl                 # contextual help for any command

Install

Requires Python 3.12 or newer.

pip install gog-cli

To install the latest development version directly from GitHub:

pip install git+https://github.com/aleksandarristic/gog-cli.git

Development

uv sync
uv run pytest
uv run ruff check src/ tests/

Run the CLI locally:

uv run gog --help
uv run gog list
uv run gog plan --all --summary
uv run gog dl --games-from games.txt --dry-run

Roadmap

See docs/TODO.md for planned features and improvements.

Reference

Basic Workflow

gog auth login
gog refresh
gog list
gog plan --destination /path/to/backups --all --storage --check-free-space
gog backup --destination /path/to/backups --all --yes
gog list --backup --destination /path/to/backups
gog sync --destination /path/to/backups --all --yes

gog refresh updates the local purchased-library and download-metadata caches. It does not download game installers. Run it before browsing or filtering newly added library metadata.

--destination is optional everywhere above — it defaults to the current directory, so cd into a backup folder and drop it from every command.

Browsing Purchased Games

gog list reads the local cache written by gog refresh; it does not contact GOG. Human output includes ID, title, release year, genre/category, and platforms when those fields are available. JSON output also includes scriptable metadata such as owned, release_date, genres, and is_installable.

gog list alone lists everything; gog list TEXT fuzzy-searches by title. Neither purchased nor backup is a reserved word — a game actually titled either one is never shadowed. gog list --backup/--back lists games recorded in a backup manifest instead.

Examples:

gog list
gog list --format json
gog list witcher
gog list "baldurs gate"
gog list --platform windows
gog list ftl --platform linux
gog list --year 1998..2005
gog list --year 2010..2020 --include-unknown-year
gog list --genre strategy
gog list --genre arcade,rts
gog list --genre strategy --include-unknown-genre
gog list "baldurs gate" --platform linux --format json

Use gog search TEXT to search the public GOG catalog instead of your local library — results include an owned column/field so you can see at a glance whether you already have a game.

Year filters omit games with unknown years by default; use --include-unknown-year to keep them. Genre filters similarly omit unknown genres by default; use --include-unknown-genre to keep those rows.

Planning Backups

gog plan shows the same dry-run plan as gog backup --dry-run without downloading files or creating backup directories. Use it before long backup runs to estimate size, inspect filters, and check destination free space.

Examples:

gog plan --destination /path/to/backups --all
gog plan --destination /path/to/backups --all --summary
gog plan --destination /path/to/backups --all --storage
gog plan --destination /path/to/backups --all --check-free-space
gog plan --destination /path/to/backups --all --format json
gog plan --destination /path/to/backups cyberpunk_2077

Platform and language filters can reduce backup size:

gog plan --destination /path/to/backups --all --platform linux --storage
gog plan --destination /path/to/backups --all --platform windows --language en --storage

Selecting Games

The simplest way to select a game is a bare positional argument — a product ID, slug, or title. Titles don't need to be exact: if there's no exact id/slug/title match, the selector falls back to fuzzy title matching.

gog dl "civilization iv"          # fuzzy title match
gog dl 1760534591                 # exact id, never ambiguous
gog backup witcher_3 --yes

If a fuzzy selector matches more than one game, gog prompts you to pick one at an interactive terminal, or exits with an error listing the candidates otherwise (scripts, --no-interactive, or CI). Use an exact id or slug to sidestep ambiguity entirely.

--game/-g behaves the same but only ever matches exactly (product id, slug, or exact title) — no fuzzy fallback — which is what you want for scripts and games.txt files where the match must be deterministic. It's repeatable:

gog plan --destination /path/to/backups --game witcher_3 --game cyberpunk_2077
gog backup --destination /path/to/backups --game 123456789 --yes

Platform and role filters have shortcut flags on top of the general --platform/--role options:

gog dl "civilization iv" --win              # shortcut for --platform windows
gog dl "baldurs gate 3" --mac --lin         # --mac / --lin (or --linux)
gog dl "civilization iv" --extras           # shortcut for --role extra

For larger curated lists, put selectors in a UTF-8 text file and pass --games-from. Blank lines and lines whose first non-whitespace character is # are ignored.

Example games.txt:

# first NAS batch
witcher_3
cyberpunk_2077
123456789

Use the selector file in plan, backup, or sync workflows:

gog plan --destination /path/to/backups --games-from games.txt --storage
gog backup --destination /path/to/backups --games-from games.txt --downloader aria2c --yes
gog sync --destination /path/to/backups --games-from games.txt --dry-run

--games-from is repeatable and combines with repeated --game flags. Do not combine explicit game selectors with --all.

Downloading

gog backup/gog download/gog dl are the same command. If aria2c is installed and on PATH, it's used automatically; otherwise the built-in direct downloader is used. Pass --downloader explicitly to override either way:

gog dl --games-from games.txt --yes                    # aria2c if present, else direct
gog dl --games-from games.txt --downloader direct --yes # force the built-in downloader

When file size metadata is available, gog chooses aria2c connection settings by size: very small files use one connection, mid-size files use two or four, and multi-GB installers use eight or sixteen. Configure aria2c_policy = "conservative" or aria2c_policy = "aggressive" to tune this behavior.

Without --yes, backup and sync commands print a dry-run plan and exit without downloading or modifying backup files.

Release files for gog-cli 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gog-cli 1.0.2
File Size Uploaded
gog_cli-1.0.2.tar.gz 79.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gog-cli 1.0.2
File Interpreter ABI Platform
gog_cli-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 133.6 kB

Release files / gog_cli-1.0.2.tar.gz

Download URL gog_cli-1.0.2.tar.gz
Size 79.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2455c60f4faeed02d1ba61b7b93b9b68057e2777dbb87dc04ac5c3ed382e002e
BLAKE2b-256 checksum
How to use checksums
9018fbfc2a355615408e6cf73953040ca3ea72d697318e800ed68a43e8be424f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / gog_cli-1.0.2-py3-none-any.whl

Download URL gog_cli-1.0.2-py3-none-any.whl
Size 54.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d2f0345f7e8d23a7d8df30a81a3f7613b8f79c123da34ab3ba2746bf8a8dfbb
BLAKE2b-256 checksum
How to use checksums
9228ab40bed8d18a234375cdd3ba36e72f6b99905e5dbe1a45c2bebc3aa0f2ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page