# gogarchiver-ng A Java rewrite of [gogarchiver](https://github.com/markozajc/gogarchiver), the GOG.com archival tool written in bash, with many improvements: * a better, more flexible CLI * parallel download support * DLC support * account library retrieval * a much improved interface ## Building Prerequisites: * JDK (>= 17) * Maven (>= 3.2.5) Run the following: ``` $ mvn clean package ``` The output runnable JAR will be written to `target/gogarchiver-ng.jar`. There will be another JAR with the version number in that directory - ignore it. ## Finding the authorization token 1. Open firefox 2. Log into GOG.COM 3. Open developer tools (Ctrl + Shift + Alt) 4. Navigate to the *Storage* tab 5. Select *Cookies*, and then *https://www.gog.com/* on the left sidebar 6. Locate the `gog-al` cookie, and copy its value The cookie can be passed to gogarchiver-ng directly (via `-k`) or through a file for better security (via `-K`). ## Available on: * [https://git.zajc.eu.org/gogarchiver-ng.git/](https://git.zajc.eu.org/gogarchiver-ng.git/) * [https://github.com/markozajc/gogarchiver-ng/](https://github.com/markozajc/gogarchiver-ng/) Prebuilt binaries are available at [https://files.zajc.eu.org/builds/gogarchiver-ng/](https://files.zajc.eu.org/builds/gogarchiver-ng/).

Usage

-k, --token=TOKEN

GOG token, which can be extracted from the gog-al cookie

-K, --token-file=PATH

read GOG token from a file

-o, --output=PATH

directory to write downloaded games to

-t, --threads=THREADS

number of download threads

Default: (same as machine's thread count)
-q, --quiet

disable progress bars

-c, --color=MODE

control output color. Supported are auto, on, off

-h, --help

Show this help message and exit.

-V, --version

Print version information and exit.

Filter options

--[no-]installers

download installers

Default: true
--[no-]patches

download version patches

Default: true
--[no-]dlcs

download available DLCs

Default: true
-i, --include-game=ID[,ID…​]

only the listed game IDs will be downloaded. Game IDs can be obtained from https://www.gogdb.org/

-e, --exclude-game=ID[,ID…​]

all games owned by the account except those listed will be downloaded

--include-platform=PLATFORM[,PLATFORM…​]

platforms to download for. Supported are linux, windows, mac

--exclude-platform=PLATFORM[,PLATFORM…​]

platforms to not download for

Advanced options

-v, --verbose

display verbose log messages

--[no-]unknown-types

download unknown download types

Default: false