A tool to retrieve information from Twitch.
1# purple-cli
2
3`purple-cli` is a tool to retrieve information from Twitch, in a format that can be
4used to integrate with other scripts or applications.
5
6It requires to have an application created in Twitch, with a client id and a client
7secret that will be use to obtain the necessary credentials.
8
9## Install
10
11The recommended way to install purple is using [pipx](https://pipx.pypa.io/latest/installation/).
12This could be done by using directly the repository URL:
13
14```bash
15pipx install git+https://tangled.org/mgabarda.com/purple-cli
16```
17
18This will add `purple` command to your shell:
19
20```bash
21$ purple -h
22usage: purple [-h] [-v] [-V] [--popular [POPULAR]] [-l [LANG]]
23
24Get the list of live streams from the list of following channels in Twitch.
25
26options:
27 -h, --help show this help message and exit
28 -v, --verbose increase output verbosity
29 -V, --version show version
30 --popular [POPULAR] get the list of live streams with most viewers (top 20 by default).
31 -l, --lang [LANG] filter the list of live streams by language.
32```
33
34## Settings
35
36`purple-cli` requires uses a [Twitch application](https://dev.twitch.tv/console/apps/create),
37and to take from there the credentials.
38
39The following environment variables can be used to set the credentials:
40
41- `PURPLE_CLIENT_ID` Twitch application client id.
42- `PURPLE_CLIENT_SECRET` Twitch application client secret.