Skip to content

the-hugin/twitch-watcher

Repository files navigation

Twitch Watcher

Watch a Twitch channel with Twitch-Channel-Points-Miner-v2, keep IRC presence while the stream is live, and stop when the stream ends.

             +-------------------+
             |   cli.py setup    |
             +---------+---------+
                       |
                       v
                  local .env
                       |
                       v
+-------------+   +----+-----+   +-----------------------------+
| Twitch API  +<--+ run.py   +-->+ Twitch-Channel-Points-Miner |
+-------------+   +----+-----+   +-----------------------------+
                       |
                       v
                 Twitch IRC chat

Features

  • Waits until the configured stream goes live.
  • Joins Twitch IRC for chat presence.
  • Runs channel-points mining for watch streaks.
  • Exits when the stream ends.
  • Keeps credentials in a local .env file.

Install

py -3 -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt

Configure

Run the setup wizard:

py -3 cli.py setup

It writes a local .env file:

TWITCH_AUTH_TOKEN=
TWITCH_USERNAME=
TWITCH_CHANNEL=
TWITCH_CLIENT_ID=

TWITCH_AUTH_TOKEN may include the oauth: prefix. The saved value is normalized before use.

Check the config without printing secrets:

py -3 cli.py validate

Run

py -3 cli.py run

Direct runtime entrypoint:

py -3 run.py

CLI

py -3 cli.py setup      create or update .env step by step
py -3 cli.py validate   check required values, mask the token
py -3 cli.py run        start the watcher

Docker

docker build -t twitch-watcher .
docker run --rm --env-file .env twitch-watcher

Windows Autostart

Run PowerShell as Administrator:

py -3 setup_autostart.py

Remove the scheduled task:

py -3 remove_autostart.py

Files

.
|-- cli.py                 interactive setup, validation, launcher
|-- config_helpers.py      .env parser and writer
|-- run.py                 watcher runtime
|-- setup_autostart.py     Windows Task Scheduler registration
|-- remove_autostart.py    Windows Task Scheduler cleanup
|-- requirements.txt       Python dependencies
|-- Dockerfile             container runtime
`-- .env.example           config template

Git Hygiene

These paths are ignored and should stay local:

.env
.env.*
analytics/
cookies/
logs/
*.exe

Check before pushing:

git status --short --ignored

About

Twitch watcher with CLI setup for channel points and IRC presence

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors