Scripts to view and open Twitch.tv livestreams from the command line
- python 3
- a valid Twitch.tv OAUTH token
- Livestreamer command line utility
- FZF (optional, for zsh plugin)
-
Clone the repository:
git clone https://github.com/rahulsalvi/twitcher.git "${TWITCHER_DIR:-$HOME}/.twitcher"
-
Create an environment variable
TWITCH_TOKEN
with a Twitch.tv OAUTH token:export TWITCH_TOKEN=<your token>
-
Add the following line to your .zshrc:
[ -f "${TWITCHER_DIR:-$HOME}/.twitcher/twitcher.zsh" ] && source "${TWITCHER_DIR:-$HOME}/.twitcher/twitcher.zsh"
Use the keybind Alt-t to open an FZF window with your followed streams. Selecting a stream (or many) will open them using the Livestreamer utility
There are several environment variables that control how twitcher behaves
TWITCHER_DIR
- Set this to the location to where you cloned the project
TWITCH_TOKEN
- The OAUTH token to use. Since this is linked to a Twitch.tv account, multiple can be used if desired
FZF_TWITCHER_OPTS
- The options passed to FZF when opening twitcher
A Twitch.tv OAUTH token can be generated by registering your own Twitch.tv application or with this tool
- Rahul Salvi - rahulsalvi
This project is licensed under the MIT License - see the LICENSE file for details