purple-cli#
purple-cli is a tool to retrieve information from Twitch, in a format that can be
used to integrate with other scripts or applications.
It requires to have an application created in Twitch, with a client id and a client secret that will be use to obtain the necessary credentials.
Install#
The recommended way to install purple is using pipx. This could be done by using directly the repository URL:
pipx install git+https://tangled.org/mgabarda.com/purple-cli
This will add purple command to your shell:
$ purple -h
usage: purple [-h] [-v] [-V] [--popular [POPULAR]] [-l [LANG]]
Get the list of live streams from the list of following channels in Twitch.
options:
-h, --help show this help message and exit
-v, --verbose increase output verbosity
-V, --version show version
--popular [POPULAR] get the list of live streams with most viewers (top 20 by default).
-l, --lang [LANG] filter the list of live streams by language.
Settings#
purple-cli requires uses a Twitch application,
and to take from there the credentials.
The following environment variables can be used to set the credentials:
PURPLE_CLIENT_IDTwitch application client id.PURPLE_CLIENT_SECRETTwitch application client secret.