A minimal Twitch CLI app built on top of mpv, streamlink, and fzf.
- Python 3.10+
- mpv
- streamlink
- fzf
$ pipx install twitch-playOr with pip:
$ pip install twitch-playThen run:
$ twitch-play$ git clone https://github.com/kasramp/twitch-play
$ cd twitch-play
$ python -m venv venv && source venv/bin/activate
$ pip install -r requirements.txt
$ ./play-twitchThere's a Client ID in the config.py file, which you can use for experiments. Ideally, you want to create your own app and use it, following the steps below:
- Go to dev.twitch.tv/console and register a new app.
- Set the OAuth redirect URL to
http://localhost:8765/callbackand category to Website Integration. - Copy your Client ID and set it in
twitch_play/config.py.
| Key | Action |
|---|---|
| Enter | Play stream at best quality |
| Ctrl-L | Play at 480p |
| Ctrl-H | Play at 720p |
| Ctrl-B | Play at best quality |
| Ctrl-O | Pick quality from list |
| Ctrl-F | Search categories (category screen) |
| Esc | Go back |