Simple twitch tool for command-line that does only two things.
$ twitch
┌──────────────┬───────────────────────────────────────────┬─────────────────────┬─────────┐
│ name │ status │ game │ viewers │
├──────────────┼───────────────────────────────────────────┼─────────────────────┼─────────┤
│ followgrubby │ Grubby - HL - w/ Commentary, Q&A Welcome! │ Heroes of the Storm │ 4141 │
├──────────────┼───────────────────────────────────────────┼─────────────────────┼─────────┤
│ tehreaver │ CHAMP IS BACK. LETS GO CHAMP │ Overwatch │ 110 │
└──────────────┴───────────────────────────────────────────┴─────────────────────┴─────────┘
$ twitch followgrubby
[cli][info] Found matching plugin twitch for URL twitch.tv/followgrubby
[cli][info] Available streams: audio, mobile (worst), low, medium, high, source (best)
[cli][info] Opening stream: source (hls)
[cli][info] Starting player: mpv --cache 2048
- Display your followed channels currently online
- Open a channel in a media player with
streamlink
- nodejs
ramda-cli
- Install:
npm install -g ramda-cli
- Install:
streamlink
- Install:
pip install streamlink
- Install:
$ twitch [channel] [quality]
An OAuth token is required to get your followed channels from Twitch API.
- Register a new application at https://www.twitch.tv/kraken/oauth2/clients/new
- Application name can be whatever
- Enter
https://twitchapps.com/tokengen/
as Redirect URI
- Get OAuth token from https://twitchapps.com/tokengen/
- Enter the Client ID acquired from first step
- Enter
user_read
as scope
- Download
twitch
executable to somewhere in your$PATH
curl https://raw.githubusercontent.com/raine/twitch-cli/master/twitch > ~/bin/twitch
chmod +x ~/bin/twitch
- Edit
twitch
executable and setOAUTH_TOKEN
andCLIENT_ID
to the obtained values- Alternatively, you set
TWITCH_CLIENT_ID
andTWITCH_OAUTH_TOKEN
environment variables and leave the executable as is
- Alternatively, you set