{"id":21557030,"url":"https://github.com/ghostzero/tmi","last_synced_at":"2025-04-10T10:23:28.371Z","repository":{"id":41852678,"uuid":"294944536","full_name":"ghostzero/tmi","owner":"ghostzero","description":"PHP Twitch Messaging Interface","archived":false,"fork":false,"pushed_at":"2023-05-23T09:57:25.000Z","size":211,"stargazers_count":24,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T16:53:19.155Z","etag":null,"topics":["chatbot","irc","php7","tmi","tmi-cluster","twitchdev"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghostzero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"ene"}},"created_at":"2020-09-12T13:00:07.000Z","updated_at":"2024-04-03T20:21:57.000Z","dependencies_parsed_at":"2024-06-21T14:22:46.508Z","dependency_job_id":null,"html_url":"https://github.com/ghostzero/tmi","commit_stats":{"total_commits":54,"total_committers":5,"mean_commits":10.8,"dds":"0.16666666666666663","last_synced_commit":"9ea6f1b25c2937e55d56a50070ca6f0efc44399d"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostzero%2Ftmi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostzero%2Ftmi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostzero%2Ftmi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostzero%2Ftmi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostzero","download_url":"https://codeload.github.com/ghostzero/tmi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199085,"owners_count":21063641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","irc","php7","tmi","tmi-cluster","twitchdev"],"created_at":"2024-11-24T08:10:42.871Z","updated_at":"2025-04-10T10:23:28.348Z","avatar_url":"https://github.com/ghostzero.png","language":"PHP","funding_links":["https://ko-fi.com/ene"],"categories":[],"sub_categories":[],"readme":"# PHP Twitch Messaging Interface\n\n\u003ca href=\"https://packagist.org/packages/ghostzero/tmi\"\u003e\u003cimg src=\"https://img.shields.io/packagist/dt/ghostzero/tmi\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/ghostzero/tmi\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/ghostzero/tmi\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/ghostzero/tmi\"\u003e\u003cimg src=\"https://img.shields.io/packagist/l/ghostzero/tmi\" alt=\"License\"\u003e\u003c/a\u003e\n\u003ca href=\"https://ghostzero.dev/discord\"\u003e\u003cimg src=\"https://discordapp.com/api/guilds/590942233126240261/embed.png?style=shield\" alt=\"Discord\"\u003e\u003c/a\u003e\n\n## Introduction\n\nInspired 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.\n\nAlso 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.\n\n## Features\n\n- Connecting to Twitch IRC with SSL\n- Generic IRC Commands\n- Supports Twitch IRC Tags (IRC v3)\n- Supports Twitch IRC Membership\n- Supports Twitch IRC Commands\n\n## Official Documentation\n\nYou can view our official documentation [here](https://tmiphp.com/docs/).\n\n## Getting Started (w/o OAuth Token)\n\n```php\nuse GhostZero\\Tmi\\Client;\nuse GhostZero\\Tmi\\ClientOptions;\nuse GhostZero\\Tmi\\Events\\Twitch\\MessageEvent;\n\n$client = new Client(new ClientOptions([\n    'connection' =\u003e [\n        'secure' =\u003e true,\n        'reconnect' =\u003e true,\n        'rejoin' =\u003e true,\n    ],\n    'channels' =\u003e ['ghostzero']\n]));\n\n$client-\u003eon(MessageEvent::class, function (MessageEvent $e) {\n    print \"{$e-\u003etags['display-name']}: {$e-\u003emessage}\";\n});\n\n$client-\u003econnect();\n```\n\n## Getting Started (w/ OAuth Token)\n\n```php\nuse GhostZero\\Tmi\\Client;\nuse GhostZero\\Tmi\\ClientOptions;\nuse GhostZero\\Tmi\\Events\\Twitch\\MessageEvent;\n\n$client = new Client(new ClientOptions([\n    'options' =\u003e ['debug' =\u003e true],\n    'connection' =\u003e [\n        'secure' =\u003e true,\n        'reconnect' =\u003e true,\n        'rejoin' =\u003e true,\n    ],\n    'identity' =\u003e [\n        'username' =\u003e 'ghostzero',\n        'password' =\u003e 'oauth:...',\n    ],\n    'channels' =\u003e ['ghostzero']\n]));\n\n$client-\u003eon(MessageEvent::class, function (MessageEvent $e) use ($client) {\n    if ($e-\u003eself) return;\n\n    if (strtolower($e-\u003emessage) === '!hello') {\n        $client-\u003esay($e-\u003echannel-\u003egetName(), \"@{$e-\u003euser}, heya!\");\n    }\n});\n\n$client-\u003econnect();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostzero%2Ftmi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostzero%2Ftmi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostzero%2Ftmi/lists"}