Go rewrite of 0x8fv/Twitch-Channel-Points-Miner-v2 with a focus on speed and low overhead. This version keeps the same behavior (auto-claims bonuses, drops, and predictions) but trims dependencies, streams point updates over PubSub.
Credits to the original maintained fork by rdavydov, whose work inspired this Go rewrite.
- Written in Go for faster start-up and lower CPU compared to the original runtime.
- Uses Twitch PubSub for near-instant point gain logging.
- Can target a manual list of streamers or mine everyone you follow.
- Install Go 1.21+.
- Copy
config.json(it will be created/extended on first run) and setusernameplus any options you want. Leave thestreamersarray empty to mine all followed channels. - Run
go run .(orgo build -o twitch-minerand execute./twitch-miner). - On first launch you will see a device code prompt. Open
https://www.twitch.tv/activate, enter the code, and wait until the app confirms login. Cookies are saved tocookies/<username>.jsonfor future runs. - Press Ctrl+C to stop; a session summary is printed on exit.
username: Twitch login used for mining and for the cookie filename.password: Optional; device login is used, so you can leave this as-is.debug: Enable debug logs (high-level request summaries, PubSub message metadata).debug_deep: Enable deep debug logs (full request/response bodies and PubSub payloads); only emitted whenprivacy.anonymize_logsisfalse.smart_logging,emojis,show_seconds,show_username_in_console,show_claimed_bonus_msg: Console output preferences.save_logs: Write console output tolog/<username>.login addition to stdout.privacy.anonymize_logs: Replace streamer names and point balances in all logs with anonymized values; when enabled,save_logswrites tolog/miner.log.discord: Optional Discord webhook notifications. Providewebhook_apiplusevents(list of event names to send). Supported events:STARTUP,SHUTDOWN,STREAMER_ONLINE,STREAMER_OFFLINE,GAIN_FOR_RAID,GAIN_FOR_CLAIM,GAIN_FOR_WATCH,GAIN_FOR_WATCH_STREAK,BET_WIN,BET_LOSE,BET_REFUND,BET_FILTERS,BET_GENERAL,BET_FAILED,BET_START,BONUS_CLAIM,MOMENT_CLAIM,JOIN_RAID,DROP_CLAIM,DROP_STATUS,CHAT_MENTION.disable_ssl_cert_verification: For environments with custom TLS interception; leavefalseunless you know you need it.timezone: Optional IANA timezone name (e.g.Europe/Berlin) to override auto-detection for environments like Android/Termux; leavenull/empty to auto-detect.claim_drops_startup,claim_drops,follow_raid: Auto-claim drops at boot, continue claiming while running, and auto-follow raid targets.betting(make_predictions): Enable Twitch prediction betting.streamers: List of channel logins to mine; if empty, followers are mined in descending follow order.streamer_overrides: Per-streamer overrides keyed by login; inherit from the global flags above. Example:"streamer1": { "make_predictions": true, "follow_raid": false, "claim_drops": true, "claim_moments": false, "watch_streak": true, "community_goals": false, "bet": { "strategy": "SMART", "percentage": 5, "percentage_gap": 20, "max_points": 234, "minimum_points": 20000, "stealth_mode": true, "delay_mode": "FROM_END", "delay": 6, "filter_condition": { "by": "TOTAL_USERS", "where": "GTE", "value": 50 } } }, "streamer2": { "make_predictions": false, "follow_raid": true, "claim_drops": false, "claim_moments": true, "watch_streak": false, "community_goals": true, "bet": { "strategy": "PERCENTAGE", "percentage": 10, "percentage_gap": 15, "max_points": 5000, "minimum_points": 0, "stealth_mode": false, "delay_mode": "FROM_START", "delay": 3, "filter_condition": null } }
show_game: When true, log the game a streamer is playing on join and on watch-point gains.game_priority/game_exclude: Ordered game names to prefer and names to skip entirely. Leave empty to keep the default behavior; matches are case-insensitive.bet: Advanced prediction tuning. Defaults are applied when values arenull:strategy: DefaultSMART(seeentities.Strategyfor options such asMOST_VOTED,HIGH_ODDS,SMART_MONEY, etc.).percentage: Percent of points to bet (default 5).percentage_gap: Minimum edge between outcomes before betting (default 20).max_points: Cap per bet (default 50000).minimum_points: Skip bets below this balance (default 0).stealth_mode: If true, bets favor lower-visibility patterns (default false).delay_mode/delay: When to place the bet (defaultFROM_END, 6 seconds).filter_condition: Optional object to skip betting unless a live metric meets your rule. Example:{ "by": "TOTAL_USERS", "where": "GTE", "value": 50 }to skip bets until at least 50 users participate.bysupportsPERCENTAGE_USERS,ODDS,ODDS_PERCENTAGE,TOP_POINTS,TOTAL_USERS,TOTAL_POINTS;wheresupportsGT,LT,GTE,LTE.
- Authenticates via Twitch device flow, persists cookies per user, and refreshes the client build id for GQL calls.
- Loads channel points context to grab balances and blue chests; watches two live streams at a time for minute-watched events to keep streaks active.
- If you have an active subscription (multiplier) on a streamer, their name is highlighted in gold everywhere it appears in the logs so you can quickly spot priority channels.
- Listens to PubSub (
community-points-user-v1) for instant point gain updates and logs deltas with reasons. - Periodically claims inventory drops and can auto-join raids and continue mining the destination channel.
- Tested with Go 1.21; dependencies are in
go.mod. - Shortcut commands:
go fmt ./...to format,go test ./...to run unit tests.
- This project comes with no guarantee or warranty. You are responsible for whatever happens from using this project. It is possible to get soft or hard banned by using this project if you are not careful. This is a personal project and is in no way affiliated with Twitch.
