← All posts
Open Source 8 min read

clypso-chat: Live Twitch, Kick & YouTube Chat with Hype Detection in Python

Watch dozens of live channels from one Hub, catch the second chat goes wild, and fold emote walls into a single line an AI can read. Install with pip install clypso-chat.

clypso-chat on PyPI
Terminal demo of clypso-chat reading three platforms and firing a hype moment on jynxzi

clypso-chat is the open Python layer I use when a product needs live chat from Twitch, Kick, and YouTube in one process — and needs to know the exact second chat exploded. The readers and parsers are written in Rust and run outside the GIL, so watching many channels stays cheap. Published on PyPI as clypso-chat (MIT, CPython ≥ 3.10).

It was built to feed clipping engines like Clypso: record the stream, watch chat, cut when the room reacts. The same Hub also works for ops dashboards, research scrapes, and alert bots.

Example clypso-chat CLI watching three platforms and printing a hype line
CLI watcher — chat lines, sub events, and a HYPE stamp once a channel has two minutes of baseline.

Quick start

									pip install clypso-chat

# One or many targets: twitch:NAME, kick:NAME, youtube:@HANDLE, or a URL
python -m clypso_chat twitch:jynxzi https://kick.com/adinross youtube:@LofiGirl

# Only events + hype, or stop after a minute
python -m clypso_chat twitch:xqc --quiet
python -m clypso_chat twitch:xqc --seconds 60
								
									import time
import clypso_chat as cc

with cc.Hub() as hub:
    stream = hub.join("twitch:jynxzi")  # or kick:… / youtube:@… / URL
    time.sleep(20)
    for author, text, ts in hub.drain(stream):
        print(author, ":", text)
								

Real use cases

1. Auto-clipping Shorts from live streams

A clipping service keeps a rolling video buffer while clypso-chat joins every channel on tonight’s roster. When Counter / hub.tick fires, it returns a timestamp a few seconds before the spike (chat_lag_s). That timestamp is where the cut starts: facecam + gameplay, captions, title card, queue for Shorts / TikTok / Reels. Operators review finished clips instead of sitting through eight-hour VODs. This is the loop Clypso markets as “chat spike → clip it.”

  • Join twitch:, kick:, and youtube: targets in one Hub — one Rust runtime, one OS thread by default.
  • Tune warmup_s, z_on, min_rate, and cooldown_s so quiet chill streams and chaotic GTA lobbies do not share the same threshold.
  • Use events() for raids, gift bombs, bits, Super Chats, and memberships as extra clip triggers.

2. Multi-stream ops / moderation dashboard

Agencies and clip farms watch ten to forty creators at once. Hub.drain_all() and status() give per-channel connected state, reconnect counts, and last errors. With details=True, messages() expose badges, mod/sub/VIP flags, reply targets, and emotes — enough to power a wallboard without separate IRC/WebSocket clients per platform.

3. Feed chat into an LLM without drowning the prompt

A hype window is often an emote wall: fifty lines of KEKW and “clip it.” signals() returns per-second rates (messages, distinct chatters, reactions, repeats). compact() folds repeats into one row with counts, using norm() so “LMAOOO” and “lmao” match. That condensed packet is what you send to a model that decides “was this clip-worthy?” instead of pasting raw IRC.

									chat = [...(author, text, ts)...]  # from hub.drain
cc.signals(chat)                 # (second, msgs, chatters, reactions, repeats)
cc.compact(chat, max=10)         # top reactions + spread of unique lines
								

4. Raid / drama / highlight alert bots

A Discord or Telegram bot joins a creator’s channels, stays quiet most of the night, then posts when hub.tick returns a moment or when events() sees a large raid or gift bomb. --quiet on the CLI is the same idea for humans watching a terminal: only events and hype lines.

5. Research and analytics on cross-platform chat

Because parsers are also available as twitch_line / kick_item / youtube_item (and *_message / *_event for dicts), you can reuse the same Rust parsing on your own sockets or archived logs. Typed stubs in clypso_chat/_native.pyi keep editors honest while you build rate charts or badge studies.

What one Hub covers

AreaDetail
PlatformsTwitch IRC over TLS; Kick Pusher WebSocket; YouTube live chat polling
Join syntaxtwitch:name, kick:name, youtube:@handle / video id / URL — Kick rooms and YT lives looked up for you
EventsSubs, gifts, bits, raids/hosts, Super Chats/Stickers, memberships
HypePer-channel baseline spike detector with cooldown and clip-oriented lag
Wheelsmanylinux, macOS arm64/x64, Windows amd64 — rustls, no system OpenSSL

Install

pip install clypso-chat. Prebuilt wheels cover common Linux, macOS, and Windows CPython ≥ 3.10. Elsewhere (Alpine/musl, Windows ARM) pip builds from source and needs a Rust toolchain. Full docs and the Clypso integration notes ship with the package on PyPI.

Package: pypi.org/project/clypso-chat/. I also cover related open-source tooling on this site under Projects.

Frequently asked questions

What is clypso-chat?

clypso-chat is an MIT-licensed Python package (v0.2.0) with Rust readers that connect to Twitch IRC, Kick’s Pusher WebSocket, and YouTube live chat. One Hub can watch many channels, return messages and platform events, and detect hype spikes against each channel’s own baseline — no login, OAuth app, or API key.

How do I install and try it?

Run pip install clypso-chat, then python -m clypso_chat twitch:CHANNEL kick:CHANNEL youtube:@HANDLE. Or join streams from Python with cc.Hub() and drain messages every second.

What is a hype moment?

A Counter (or hub.tick) measures messages per second against the channel’s recent normal rate. When chat jumps far above baseline (after a short warmup), it returns the stream timestamp a few seconds before the burst — the place to start a clip, because chat reacts after the on-stream action.

Do I need platform developer credentials?

No. Every reader is anonymous and read-only. Pass a channel name, @handle, video id, or full URL; Kick chatroom ids and YouTube live videos are looked up for you.

How fast is it?

Benchmarks vs a pure-Python twin show up to 7.6× faster Twitch parsing and about 14.5× less CPU when reading and counting a million messages across 40 streams. On seven real channels at ~8 msg/s the whole hub uses about 0.1% of one core.

Sources & citations