README

🎮 go-hoyolab

Daily HoYoLAB check-in for every HoYoverse game — set it up once, forget it forever.

Build Go Report Card Release License PRs welcome

English · ภาษาไทย · Website · Discord

check-in log

✨ Why

  • Zero setup for login — it reuses the HoYoLAB session you already have in Firefox. No passwords, no tokens to copy.
  • One small binary — a single hoyolab executable for Windows, macOS, Linux and FreeBSD. No runtime, no Docker.
  • Every game in one run — all your enabled games are checked in together, for as many accounts as you have profiles.
  • Tells you what you got — a Discord (or LINE) message lists today’s reward for each game.
  • Updates itself — picks up new releases from GitHub automatically.

🕹️ Supported games

Game Key in hoyolab.yaml Default
Genshin Impact GSI ✅
Honkai: Star Rail HSR ✅
Zenless Zone Zero ZZZ ✅
Honkai Impact 3rd HI3 —

🚀 Quick start

  1. Sign in to https://www.hoyolab.com/home in Firefox (or LibreWolf, Waterfox, Zen, Floorp).

  2. Download the archive for your OS from the latest release and unpack it.

  3. Run it:

    ./hoyolab          # Windows: hoyolab.exe
    

That is all. On the first run it writes a hoyolab.yaml next to the binary; edit it to add notifications or switch games on and off.

Important 重要

Chrome, Edge and Brave are no longer supported. They encrypt cookies with App-Bound Encryption (v20), which cannot be read from outside the browser. If your old hoyolab.yaml has profile[].browser: chrome (or edge / brave), change it to firefox — those entries are ignored with a warning.

To see which browser profiles were found:

./hoyolab --list

⚙️ Configuration

notify:
  discord-webhook: "https://discord.com/api/webhooks/..."   # optional
  line-notify: ""                                           # optional
  mini: true
profile:
  - browser: firefox
    name: []            # empty = every Firefox profile; or list profile names
games:                  # remove or comment out the games you do not play
  - GSI
  - HSR
  - ZZZ

Existing configs that still use the old per-game config: blocks keep working and are migrated automatically the next time the file is written.

🔔 Notifications

Provider How
Discord Create a webhook in Channel settings → Integrations and paste the URL into notify.discord-webhook.
LINE Notify Generate a token at notify-bot.line.me and paste it into notify.line-notify. LINE has retired this service, so prefer Discord.

Discord notification

⏰ Run it every day

Windows — Task Scheduler → Create Basic Task → Daily (e.g. 5 am) → Start a program → hoyolab.exe. Or put a shortcut to hoyolab.exe in shell:startup to check in each time the PC boots.

macOS / Linux — add a cron job:

0 5 * * * /path/to/hoyolab

🛠️ Development

go test ./...
go vet ./...
go build ./...
  • Tests never touch a real browser profile, real credentials or an outbound notification service.
  • Cookie reading lives in go-kooky/v2; game endpoints are in act/games.go; notification delivery is in act/notify.go.
  • If go build fails on VCS stamping, use go build -buildvcs=false ./....

Contributions are welcome — please open an issue first for anything large.

💬 Help

Found a bug or want a game added? Open an issue, or come say hi on Discord.

Join us on Discord

📄 License

MIT © Kananek Thongkam

评论

暂无评论