No description
Find a file
nocci 2a4653062a
All checks were successful
build-and-push / lint (push) Successful in 4s
build-and-push / sonar (push) Successful in 6s
build-and-push / docker (push) Successful in 1m10s
ci: make sonar scan pick up sources
2025-12-30 13:22:54 +00:00
.forgejo/workflows ci: make sonar scan pick up sources 2025-12-30 13:22:54 +00:00
.vscode vscode update changed config 2023-12-19 11:33:38 +01:00
src 👷 ci(build): add SonarQube scan to build workflow 2025-12-30 12:38:03 +00:00
test 👷 ci(build): add SonarQube scan to build workflow 2025-12-30 12:38:03 +00:00
.dockerignore sort .dockerignore 2023-11-07 12:03:15 +01:00
.gitignore gitignore *.env for safety :) 2023-02-22 00:52:25 +01:00
aliexpress.js 👷 ci(build): add SonarQube scan to build workflow 2025-12-30 12:38:03 +00:00
CONTRIBUTING.md Allow forks to create builds and fix failing build 2023-10-27 11:37:32 +00:00
docker-compose.yml sample command: and environment: in docker-compose.yml, #85 2023-03-06 22:13:58 +01:00
docker-entrypoint.sh fix: docker-entrypoint.sh uses safe shebang 2024-09-28 18:34:39 +01:00
Dockerfile sonarcloud fixes 2023-11-07 15:20:58 +01:00
epic-games.js Current free game title in blue 2025-04-15 17:26:27 +02:00
eslint.config.js eslint: prefer-const 2024-03-07 13:47:58 +01:00
gog.js Current free game title in blue 2025-04-15 17:26:27 +02:00
jsconfig.json fix vscode problem in jsconfig with module vs. moduleResolution 2023-11-07 16:45:17 +01:00
LICENSE Create LICENSE - AGPL-3.0 2023-11-06 19:12:16 +01:00
package-lock.json ncu -u 2025-05-15 23:51:49 +02:00
package.json ncu -u 2025-05-15 23:51:49 +02:00
prime-gaming.js 👷 ci(build): add SonarQube scan to build workflow 2025-12-30 12:38:03 +00:00
README.md alles jut 2025-12-30 13:08:44 +00:00
sonar-project.properties Sonarqube support with ESLint 2023-09-26 19:12:09 +00:00
steam-games.js 👷 ci(build): add SonarQube scan to build workflow 2025-12-30 12:38:03 +00:00
unrealengine.js filenamify datetime recordHar for Windows : -> ., fix #336 2024-06-25 15:30:02 +02:00

Free Games Claimer (Fork)

Quality Gate Status

Automates claiming of free games for:

  • Amazon Luna Gaming / Luna claims (including external stores like GOG, Epic Games, Legacy Games )
  • GOG giveaways
  • Optional extras: Steam stats, AliExpress dailies (not implemated yet)

Requirements

  • Docker or Podman (recommended), or Node.js ≥ 20 for local runs
  • Optional notifications: pip install apprise
  • Playwright dependencies are baked into the container; locally, npm install downloads Firefox.

Quickstart (Docker Run)

docker run --rm -it \
  -p 6080:6080 \
  -v fgc:/fgc/data \
  -e SHOW=1 \
  git.sky-net.it/nocci/free-games-claimer:latest \
  node prime-gaming.js
  • Ports 6080/5900: noVNC/VNC (only needed with SHOW=1)
  • Data/configs are stored in volume fgc under /fgc/data

Docker Compose Example

services:
  fgc:
    image: git.sky-net.it/nocci/free-games-claimer:latest
    container_name: fgc
    environment:
      - SHOW=1            # show browser via VNC/noVNC
      # - PG_EMAIL=...
      # - PG_PASSWORD=...
      # - PG_OTPKEY=...
    volumes:
      - fgc:/fgc/data
    ports:
      - "6080:6080"       # noVNC
      # - "5900:5900"     # VNC optional
    command: bash -c "node epic-games; node prime-gaming; node gog"
volumes:
  fgc:

Configuration (Environment Variables)

Common options:

  • SHOW=0/1 (0 = headless, 1 = UI)
  • WIDTH, HEIGHT (browser size)
  • TIMEOUT, LOGIN_TIMEOUT (seconds)
  • Login: EMAIL, PASSWORD global; per store EG_EMAIL, EG_PASSWORD, EG_OTPKEY, PG_EMAIL, PG_PASSWORD, PG_OTPKEY, GOG_EMAIL, GOG_PASSWORD
  • Prime Gaming: PG_REDEEM=1 (auto-redeem keys, experimental), PG_CLAIMDLC=1, PG_TIMELEFT=<days> to skip long-remaining offers
  • Screenshots: SCREENSHOTS_DIR (default data/screenshots)
  • Notifications: NOTIFY='...' (Apprise URL), optional NOTIFY_TITLE
  • Browser profile: BROWSER_DIR (default data/browser)
  • Recording: RECORD=1 to save videos/HAR to data/record/
  • Debugging: DEBUG=1 (opens Playwright inspector), DEBUG_NETWORK=1 (logs requests), TIME=1 (prints timings)
  • Dry run / Interaction: DRYRUN=1 (do not claim), INTERACTIVE=1 (ask before claiming), HEADLESS is derived from SHOW/DEBUG
  • Directories: SCREENSHOTS_DIR, BROWSER_DIR, DATA_DIR (prefix for data; default under data/)
  • VNC/noVNC: VNC_PASSWORD (for Docker entrypoint), NOVNC_PORT/VNC_PORT (Docker)
  • General timeouts: TIMEOUT (per action), LOGIN_TIMEOUT (extra time for login)

You can place a data/config.env; it is loaded via dotenv and is overridden by explicitly set environment variables.

Local Run Without Docker

npm install
SHOW=0 PG_EMAIL=... PG_PASSWORD=... PG_OTPKEY=... node prime-gaming.js
  • Playwright downloads Firefox to ~/.cache/ms-playwright.
  • Use SHOW=1 for a visible browser (requires GUI/Xvfb).

Persistence & Outputs

  • Data/status: data/*.json (per store)
  • Browser profile: data/browser
  • Screenshots: data/screenshots/<store>/
  • Optional videos/HAR: RECORD=1data/record/

Tip: For captchas or first-time login, run with SHOW=1 and log in once; cookies stay in the profile. Notifications via NOTIFY help surface errors (e.g., captcha, login).