Hund

wtwitch - A Twitch client written in Bash

January 3, 2021

I just found out about a new Twitch client called wtwitch. It’s written in Bash and it uses the Twitch API and the streamlink package to provide Twitch browsing, subscription, and playback functionality without signing up for a Twitch account and without loading or executing Twitch’s proprietary JavaScript.

Here’s how it looks when you list the online channels you have subscribed to:

The default look of wtwitch

wtwitch has the following commands available:

[w]atch [name]      - Watch [name] streamer.
[s]ub [name(s)]     - Subscribe to [name] streamer.
                      You can subscribe to multiple streamers in one command.
[u]nsub [name(s)]   - Unsubscribe from [name] streamer.
                      You can unsubscribe from multiple streamers in one command.
[c]heck             - View your settings and the status of streamers you are
                      subscribed to.
[e] [search-term]   - Search games/categories for [search-term].
[n] [search-term]   - Search streamers/channels for [search-term].
[g]ame [name]       - View the top streamers for [name] game/category.
[t]op               - View the top games and streamers on Twitch.
[f]                 - Toggle the printing of offline subscriptions with [c]heck.
[l]                 - Toggle the usage of colors in wtwitch output.
[p]layer [program]  - Change the player program that gets passed to streamlink.
[q]uality [quality] - Change the video quality that gets passed to streamlink.
[b]lock [name(s)]   - Block [name] streamer, preventing them from appearing in any
                      output. You can block multiple streamers in one command.
[v]ersion           - Print the current version of wtwitch.
[h]elp              - Print this help.

You can install the manual page yourself (see below) or just have a look at the online manual if you need any help.

Installation

This is a Bash script, so the ‘installation’ is rather simple; you can just put the script in your $PATH and then run it, but I do recommend creating a symbolic link from the source directory to your $PATH instead. This makes updating the source a lot easier.

This is what I did to create a symbolic link:

$ ln -s ~/src/git/wtwitch/src/wtwitch ~/.local/bin

Do note that wtwitch requires streamlink and jq, both packages should be available in the repositories for any common Linux based operating systems. In Gentoo, they’re available as net-misc/streamlink and app-misc/jq.

Manual page

If, you want to install an offline copy of the manual you need to install the tool scdoc. It’s available in Gentoo as app-text/scdoc.

Make sure that you’re in the src directory and then run scdoc:

$ scdoc < wtwitch.1.scd > wtwitch.1

You can then view the manual page with the command:

$ man -l wtwitch.1

Meta

No Comments

Use the e-mail form, if you wish to leave feedback for this post. Markdown is supported. [Terms of service]