https://github.com/preocts/twitch-alerts
https://github.com/preocts/twitch-alerts
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/preocts/twitch-alerts
- Owner: Preocts
- License: mit
- Created: 2025-08-22T03:17:30.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-08-29T00:13:45.000Z (9 months ago)
- Last Synced: 2025-08-30T11:36:40.761Z (9 months ago)
- Language: Python
- Size: 110 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.python.org/downloads)
[](https://github.com/psf/black)
[](https://github.com/wntrblm/nox)
[](https://results.pre-commit.ci/latest/github/Preocts/twitch-alerts/main)
[](https://github.com/Preocts/twitch-alerts/actions/workflows/python-tests.yml)
# twitch-alerts
Because I get tired of nonexistance alerts from TwitchTv.
- [Contributing Guide and Developer Setup Guide](./CONTRIBUTING.md)
- [License: MIT](./LICENSE)
---
## Install
1. Clone the repo down
2. If you have `uv`:
1. `uv sync`
3. If you don't:
1. Create a venv (or don't, I'm not your senior)
2. `python -m pip install .`
## Setup
1. Rename `.env.sample` to `.env`
2. Open the `.env` file
3. Open the `twitch-alerts.toml` file
### Twitch
A TwitchTV application is required.
1. [Spin up an application on the twitch dev console](https://dev.twitch.tv/console)
2. The redirect url can be `http://localhost:3000`
3. Copy the `client_id` into the `twitch-alerts.toml`
4. Copy the `client_secret` into the `.env` file
### Discord
For discord notifications:
1. Select the desired channel and "Edit Channel"
2. In "Integrations" create a webhook
3. Copy the webhook URL into the `.env` file for `TWITCH_ALERT_DISCORD_WEBHOOK`
### PagerDuty
For PagerDuty notifications a standard CAF alert is sent at with INFO severity.
Any API v2 integration key will work (global or service-level).
1. Copy the integration key into the `.env` file for `TWITCH_ALERT_PAGERDUTY_KEY`
## Run
To run forever:
```console
twitch-alerts-scan
```
To run once:
```console
twitch-alerts-scan-once
```
---
Sparcely documented things:
- Alternate toml configuration files can be made. Pass the desired toml in as the first CLI arguement
- State between scans is kept in `temp_twitch-alerts-state.json`
- Delete it whenever
- It is not multi-process safe