A tool to retrieve information from Twitch.
Python 100.0%
Other 0.1%
6 1 1

Clone this repository

https://tangled.org/mgabarda.com/purple-cli https://tangled.org/did:plc:leadkratzafsoun4byj6rp6s/purple-cli
git@tangled.org:mgabarda.com/purple-cli git@tangled.org:did:plc:leadkratzafsoun4byj6rp6s/purple-cli

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

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_ID Twitch application client id.
  • PURPLE_CLIENT_SECRET Twitch application client secret.