Skip to content
/ gogg Public
generated from habedi/template-go-project

A multiplatform game file downloader for GOG

License

Notifications You must be signed in to change notification settings

habedi/gogg

Repository files navigation

Gogg logo

Tests Linux Build Windows Build MacOS Build
Go Report Card Code Coverage CodeFactor Release Total Downloads

Gogg

Gogg is a minimalistic command-line tool for downloading game files from GOG.com. It is written in Go and uses the official GOG API.

The main goal of Gogg is to provide a simple and easy-to-use interface for people who want to download their GOG games for offline use or archival purposes.

Features

Main features of Gogg:

  • It can be used to fully automate the download process with a few simple commands.
  • It can run anywhere (Windows, macOS, or Linux) that a Go compiler is available.

Additionally, it allows users to perform the following actions:

  • List owned games
  • Export the list of owned games to a file
  • Search in the owned games
  • Download game files (like installers, patches, and bonus content)
  • Filter files to be downloaded by platform, language, and other attributes like content type
  • Download files using multiple threads to speed up the process
  • Resume interrupted downloads and only download missing or newer files
  • Verify the integrity of downloaded files by calculating their hashes
  • Calculate the total size of the files to be downloaded (for storage planning)

Getting Started

See the documentation for how to install and use Gogg.

Run gogg -h to see the available commands and options.

Examples

For more detailed examples, see the content of the examples directory.

Login to GOG

# First-time using Gogg, you need to login to GOG to authenticate
gogg login

Important

You need to have Google Chrome or Chromium installed on your machine for the first-time authentication. So, make sure you have one of them installed and available in your system's PATH.

Syncing the Game Catalogue

# Will fetch the up-to-date information about the games you own on GOG
gogg catalogue refresh

Searching for Games

# Will show the game ID and title of the games that contain "Witcher" in their title
gogg catalogue search "Witcher"

Downloading a Game

# Will download the files for `The Witcher: Enhanced Edition` to `./games` directory (without extra content)
gogg download 1207658924 ./games --platform=windows --lang=en --dlcs=true --extras=false \
 --resume=true --threads 5 --flatten=true

File Hashes (For Verification)

# Will show the SHA1 hash of the downloaded files for `The Witcher: Enhanced Edition`
gogg file hash ./games/the-witcher-enhanced-edition --algo=sha1

Storage Size Calculation

# Will show the total size of the files to be downloaded for `The Witcher: Enhanced Edition`
DEBUG_GOGG=false gogg file size 1207658924 --platform=windows --lang=en --dlcs=true \
 --extras=false --unit=GB

Demo

asciicast

Contributing

Please see the CONTRIBUTING.md file for information on how to contribute to Gogg.