← All projects

Open Source · Library

tmi.js

A JavaScript library for Twitch chat. I started it in 2015, and the Twitch developer ecosystem still relies on it.

Year
2015 →
Role
Founder · Open source
Status
Maintained

What it is

Twitch chat runs on IRC over WebSockets. tmi.js wraps that protocol in a small, event-driven API so a developer can connect, listen for messages and events, and send replies in a few lines, without learning the wire format underneath.

It powers chatbots, overlays, moderation tools, and anything else that needs to read or write Twitch chat. For a long stretch it was the default way to do that in JavaScript.

Why it lasted

The surface stayed small and the defaults stayed sane. The library quietly handles the parts nobody wants to think about, like authentication, reconnection, and rate limits.

The harder lesson was maintaining something widely used on a platform I do not control. Twitch changes its auth, deprecates endpoints, and shifts behavior, and a library that thousands of projects depend on has to absorb that without breaking the people downstream. Ten years of that is its own kind of engineering.

Highlights
  • Minimal setup. Connect and start handling chat events in a handful of lines.
  • Event-driven API. A clean layer over Twitch IRC and WebSockets.
  • Handles the tedium. Authentication, reconnection, and rate limits, out of sight.
  • A decade maintained. Kept working across years of Twitch platform change.
Stack
JavaScript · Node.js · WebSockets · IRC