signal kit

Docs

Build with Twitch, YouTube, or both.

Signal Kit exposes one authenticated WebSocket for whichever providers you connect. Messages are JSON. The event field is the raw provider payload. Twitch uses EventSub payloads. YouTube uses Live Chat API resources from active broadcasts.

Install

Two ways to load the SDK.

Use the npm package in Node, Bun, or any bundled project. Use the script tag for plain HTML overlays.

terminal
npm install @signal-kit/client
overlay.html
<script src="https://signal.ryan.ceo/twe-client.js"></script>

Quick start

Connect and subscribe.

Both clients expose the same API. on(type, handler) subscribes to a specific provider event type. Use Twitch types like channel.cheer or YouTube types like youtube.live_chat.message, or pass "*" to receive every message.

Browser overlayvanilla JS
overlay.html
<script src="https://signal.ryan.ceo/twe-client.js"></script>
<script>
  const events = new SignalKit({
    url: "wss://signal.ryan.ceo/ws",
    token: "sk_live_...",
  });

  events.on("channel.cheer", ({ event }) => {
    document.body.dataset.bits = event.bits;
  });

  events.on("youtube.live_chat.super_chat", ({ event }) => {
    console.log(event.snippet.displayMessage);
  });

  events.connect();
</script>
Node / BunTypeScript
bot.ts
import { SignalKit } from "@signal-kit/client";

const events = new SignalKit({
  url: "wss://signal.ryan.ceo/ws",
  token: process.env.SIGNAL_KIT_TOKEN!,
});

events.on("*", (message) => {
  console.log(message.provider, message.type, message.event);
});

events.connect();

Message shape

One envelope, one event.

The relay keeps provider payloads raw. The event field is exactly what the source provider sends. Use type to route, ignore everything you don't care about.

message.json
{
  "type": "youtube.live_chat.message",
  "provider": "youtube",
  "account": {
    "provider": "youtube",
    "displayName": "Creator"
  },
  "subscription": {
    "type": "youtube.live_chat",
    "liveChatId": "...",
    "broadcastId": "..."
  },
  "event": {
    "id": "...",
    "snippet": {
      "type": "textMessageEvent",
      "displayMessage": "hello chat"
    },
    "authorDetails": {
      "displayName": "viewer"
    }
  },
  "receivedAt": "2026-05-15T00:00:00.000Z"
}

Event catalog

Provider event catalog.

Twitch events are managed as EventSub subscriptions when the granted scopes cover them. YouTube events come from Live Chat on active broadcasts after connecting YouTube.

YouTube Live Chat

YouTube can be used on its own or alongside Twitch. The live poller emits events like youtube.live_chat.message, youtube.live_chat.super_chat, and youtube.live_chat.super_sticker. Use message.provider to separate Twitch from YouTube in shared relay streams.

Twitch EventSub

Channel Updatev1

channel.update

Title, category, language, or mature flag changed.

Stream Onlinev1

stream.online

The channel goes live.

Stream Offlinev1

stream.offline

The channel goes offline.

Followv2

channel.follow

A viewer follows the channel.

Subscribev1

channel.subscribe

A viewer subscribes.

Subscription Endv1

channel.subscription.end

A subscription ends.

Gift Subv1

channel.subscription.gift

A viewer gifts one or more subscriptions.

Resub Messagev1

channel.subscription.message

A viewer sends a resubscription message.

Cheerv1

channel.cheer

A viewer cheers Bits.

Incoming Raidv1

channel.raid

Another broadcaster raids this channel.

Reward Redemption Addv1

channel.channel_points_custom_reward_redemption.add

A channel points reward is redeemed.

Reward Redemption Updatev1

channel.channel_points_custom_reward_redemption.update

A redemption status changes.

Poll Beginv1

channel.poll.begin

A poll starts.

Poll Progressv1

channel.poll.progress

A poll receives votes.

Poll Endv1

channel.poll.end

A poll ends.

Prediction Beginv1

channel.prediction.begin

A prediction starts.

Prediction Progressv1

channel.prediction.progress

A prediction receives participation.

Prediction Lockv1

channel.prediction.lock

A prediction locks.

Prediction Endv1

channel.prediction.end

A prediction resolves.

Hype Train Beginv2

channel.hype_train.begin

A Hype Train starts.

Hype Train Progressv2

channel.hype_train.progress

A Hype Train progresses.

Hype Train Endv2

channel.hype_train.end

A Hype Train ends.

Goal Beginv1

channel.goal.begin

A goal starts.

Goal Progressv1

channel.goal.progress

A goal progresses.

Goal Endv1

channel.goal.end

A goal ends.

Charity Startv1

channel.charity_campaign.start

A charity campaign starts.

Charity Progressv1

channel.charity_campaign.progress

A charity campaign progresses.

Charity Stopv1

channel.charity_campaign.stop

A charity campaign stops.

Charity Donatev1

channel.charity_campaign.donate

A viewer donates to charity.

Ad Break Beginv1

channel.ad_break.begin

An ad break starts.

Chat Messagev1

channel.chat.message

A chat message is sent.

Chat Notificationv1

channel.chat.notification

A system chat notification appears.

Chat Settingsv1

channel.chat_settings.update

The channel chat settings change.

Shoutout Createv1

channel.shoutout.create

A shoutout is created.

Shoutout Receivev1

channel.shoutout.receive

The broadcaster receives a shoutout.