PHPackages                             ghostzero/tmi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ghostzero/tmi

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

ghostzero/tmi
=============

PHP Twitch Messaging Interface

2.3.3(3y ago)267.3k↓16.7%8[1 PRs](https://github.com/ghostzero/tmi/pulls)2MITPHPPHP ^7.4|^8.0

Since Sep 12Pushed 2y ago3 watchersCompare

[ Source](https://github.com/ghostzero/tmi)[ Packagist](https://packagist.org/packages/ghostzero/tmi)[ RSS](/packages/ghostzero-tmi/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (14)Used By (2)

PHP Twitch Messaging Interface
==============================

[](#php-twitch-messaging-interface)

[![Total Downloads](https://camo.githubusercontent.com/abad0e839c6edd26f93e0e0e49454149b893c8f2f11800131742dfe586f7d81c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67686f73747a65726f2f746d69)](https://packagist.org/packages/ghostzero/tmi)[![Latest Stable Version](https://camo.githubusercontent.com/0c4322e880a296c640a047aea9959c9beba62c179de4f17f6dd763aad0d459bf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67686f73747a65726f2f746d69)](https://packagist.org/packages/ghostzero/tmi)[![License](https://camo.githubusercontent.com/e063ca4b700fc9ec03f664f9499f2f8e9a65a918053f94f518e828bcf37935c0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f67686f73747a65726f2f746d69)](https://packagist.org/packages/ghostzero/tmi)[![Discord](https://camo.githubusercontent.com/370a8a274a1404e0d09e92921a2713abeb12f336c315c5e8c662c1d02a578c99/68747470733a2f2f646973636f72646170702e636f6d2f6170692f6775696c64732f3539303934323233333132363234303236312f656d6265642e706e673f7374796c653d736869656c64)](https://ghostzero.dev/discord)

Introduction
------------

[](#introduction)

Inspired by [tmi.js](https://github.com/tmijs/tmi.js) and [php-irc-client](https://github.com/jerodev/php-irc-client) this package is a full featured, high performance Twitch IRC client written in PHP 7.4.

Also have a look at [ghostzero/tmi-cluster](https://github.com/ghostzero/tmi-cluster). TMI Cluster is a Laravel package that makes the PHP TMI client scalable.

Features
--------

[](#features)

- Connecting to Twitch IRC with SSL
- Generic IRC Commands
- Supports Twitch IRC Tags (IRC v3)
- Supports Twitch IRC Membership
- Supports Twitch IRC Commands

Official Documentation
----------------------

[](#official-documentation)

You can view our official documentation [here](https://tmiphp.com/docs/).

Getting Started (w/o OAuth Token)
---------------------------------

[](#getting-started-wo-oauth-token)

```
use GhostZero\Tmi\Client;
use GhostZero\Tmi\ClientOptions;
use GhostZero\Tmi\Events\Twitch\MessageEvent;

$client = new Client(new ClientOptions([
    'connection' => [
        'secure' => true,
        'reconnect' => true,
        'rejoin' => true,
    ],
    'channels' => ['ghostzero']
]));

$client->on(MessageEvent::class, function (MessageEvent $e) {
    print "{$e->tags['display-name']}: {$e->message}";
});

$client->connect();
```

Getting Started (w/ OAuth Token)
--------------------------------

[](#getting-started-w-oauth-token)

```
use GhostZero\Tmi\Client;
use GhostZero\Tmi\ClientOptions;
use GhostZero\Tmi\Events\Twitch\MessageEvent;

$client = new Client(new ClientOptions([
    'options' => ['debug' => true],
    'connection' => [
        'secure' => true,
        'reconnect' => true,
        'rejoin' => true,
    ],
    'identity' => [
        'username' => 'ghostzero',
        'password' => 'oauth:...',
    ],
    'channels' => ['ghostzero']
]));

$client->on(MessageEvent::class, function (MessageEvent $e) use ($client) {
    if ($e->self) return;

    if (strtolower($e->message) === '!hello') {
        $client->say($e->channel->getName(), "@{$e->user}, heya!");
    }
});

$client->connect();
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 88.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~83 days

Recently: every ~174 days

Total

12

Last Release

1153d ago

Major Versions

1.0.0 → 2.0.0-rc.12020-11-01

PHP version history (2 changes)1.0.0PHP ^7.4

2.1.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/03da561a330aa76d1a09096b2ee0c48ee53ca51d62fa0239469d9615b6855733?d=identicon)[ghostzero](/maintainers/ghostzero)

---

Top Contributors

[![ghostzero](https://avatars.githubusercontent.com/u/6547306?v=4)](https://github.com/ghostzero "ghostzero (55 commits)")[![Katzen48](https://avatars.githubusercontent.com/u/19516002?v=4)](https://github.com/Katzen48 "Katzen48 (5 commits)")[![Bjornar97](https://avatars.githubusercontent.com/u/1843267?v=4)](https://github.com/Bjornar97 "Bjornar97 (1 commits)")[![danilopolani](https://avatars.githubusercontent.com/u/6277291?v=4)](https://github.com/danilopolani "danilopolani (1 commits)")

---

Tags

chatbotircphp7tmitmi-clustertwitchdev

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ghostzero-tmi/health.svg)

```
[![Health](https://phpackages.com/badges/ghostzero-tmi/health.svg)](https://phpackages.com/packages/ghostzero-tmi)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k234.7M20.6k](/packages/friendsofphp-php-cs-fixer)[react/react

ReactPHP: Event-driven, non-blocking I/O with PHP.

9.1k3.6M63](/packages/react-react)[botman/botman

Create messaging bots in PHP with ease.

6.2k1.5M97](/packages/botman-botman)[wyrihaximus/react-child-process-messenger

Messenger decorator for react/child-process

32279.4k4](/packages/wyrihaximus-react-child-process-messenger)[rickysu/php-livereload

a livereload server implement by php

753.9k](/packages/rickysu-php-livereload)[xibosignage/xibo-xmr

Xibo Message Relay

1011.5k](/packages/xibosignage-xibo-xmr)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
