free-games-claimer/README.md
nocci eba07721ca
Some checks failed
build-and-push / docker (push) Failing after 1m55s
📝 docs(README): update instructions and clarify configurations
- update registry image references to point to `git.sky-net.it/nocci/free-games-claimer`
- improve clarity on Docker and Docker Compose examples
- translate German sections into English for wider accessibility
- add detailed explanations for environment variables and configurations
- enhance quickstart and CI instructions for better understanding
2025-12-29 14:38:54 +00:00

3.2 KiB

Free Games Claimer (Fork)

Automates claiming of free games for:

  • Epic Games Store (and Epic-linked assets)
  • Amazon Prime Gaming / Luna claims (including external stores like GOG, Legacy, Microsoft)
  • GOG giveaways
  • Optional extras: Steam stats, AliExpress dailies (experimental)

This fork adds a Forgejo CI pipeline and instructions for running the pre-built image from the registry at git.sky-net.it/nocci/free-games-claimer.

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:

CI / Build Your Own Image

  • Workflow: .forgejo/workflows/build.yml builds/pushes on push to main.
  • Secrets needed in Forgejo:
    • REGISTRY (e.g., git.sky-net.it)
    • REGISTRY_IMAGE (e.g., git.sky-net.it/nocci/free-games-claimer)
    • REG_USER, REG_TOKEN (PAT with package push)
  • Requires a self-hosted runner with Docker access (runs-on: self-hosted).

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

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).