Skip to main content

Twitch Play

A minimal Twitch CLI app built on top of mpv, streamlink, and fzf.

Requirements

Installation

$ pipx install twitch-play

Or with pip:

$ pip install twitch-play

Then run:

$ twitch-play

From source

$ git clone https://github.com/kasramp/twitch-play
$ cd twitch-play
$ python -m venv venv && source venv/bin/activate
$ pip install -r requirements.txt
$ ./play-twitch

Configuration

There's a Client ID in the config.py file, which you can use for experiments. Ideally, you want to create your own app and use it, following the steps below:

  1. Go to dev.twitch.tv/console and register a new app.
  2. Set the OAuth redirect URL to http://localhost:8765/callback and category to Website Integration.
  3. Copy your Client ID and set it in twitch_play/config.py.

Usage

Key Action
Enter Play stream at best quality
Ctrl-L Play at 480p
Ctrl-H Play at 720p
Ctrl-B Play at best quality
Ctrl-O Pick quality from list
Ctrl-C Copy the stream URL to the clipboard
Ctrl-F Search categories (category screen)
Ctrl-O Open a stream URL, prefilled from the clipboard (category screen)
Esc Go back

Chat

Key Action
/ Search as you type (Enter to browse the results, Esc to cancel)
p Pause chat scrolling, or clear the search
k / Up Go up in the chat
j / Down Go down in the chat
y Copy the selected message
i Write a chat message (Enter to send, Esc to cancel)

Metadata

Release files for twitch-play 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for twitch-play 0.3.0
File Size Uploaded Provenance Actions
twitch_play-0.3.0.tar.gz 34.8 kB Without provenance Details for twitch_play-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for twitch-play 0.3.0
File Interpreter ABI Platform Actions
twitch_play-0.3.0-py3-none-any.whl Python 3 none any Details for twitch_play-0.3.0-py3-none-any.whl

Total release size: 63.6 kB

Release files / twitch_play-0.3.0.tar.gz

Download URL twitch_play-0.3.0.tar.gz
Size 34.8 kB
Tags Source
SHA-256 checksum
How to use checksums
63eb0b36b6a9b01f68e4e0c13c7ce93b54cdd60a3e3bdd674fdabd937ff586fe
BLAKE2b-256 checksum
How to use checksums
c8a61c82cb8091d482fc97777262e61737ad1414410c8d05764cbcb2a3257f8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Release files / twitch_play-0.3.0-py3-none-any.whl

Download URL twitch_play-0.3.0-py3-none-any.whl
Size 28.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b6d396965850157c98f80e1fd376e4ebe738474f79b5c9e2ae9d6f4a3662134
BLAKE2b-256 checksum
How to use checksums
0b3b7c1e4e1ca0fb8943ffe2bcbba11ffd74a25846e22b7172438871aedfdbf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Security for twitch-play 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page