Build Twitch-Style Live Chat in React with Claude Code and Sendbird CLI

Sendbird CLI manages Sendbird apps, Chat, and Calls from the command line. The Sendbird Client plugin gives AI coding agents Sendbird-specific SDK guidance for writing application code.
We used Claude Code and these tools to build Streamly, a Twitch-style React page with live chat beside a video area. Then the agent used Sendbird CLI to mute a test viewer for 60 seconds and verify that the viewer could no longer send messages during that period.
The video player was a placeholder. This example focuses on building and testing the live chat experience, including what viewers see when a moderator temporarily restricts someone.
Prepare Claude Code and a Sendbird test app
Use Claude Code on your computer and a Sendbird test app that does not serve real users. The tasks below create users, a channel, and messages, and change a user's moderation state.
Sendbird provides official CLI and Client plugins for Claude Code and Codex. Install both plugins from the same plugin source:
Terminal / Install both plugins
claude plugin marketplace add sendbird/sendbird-plugins
claude plugin install sendbird-cli@sendbird
claude plugin install sendbird-client@sendbirdFor official source and installation details, see the Sendbird plugin marketplace, the Client Plugin source on GitHub, and the Sendbird CLI package on npm.
Start a new Claude Code session in an empty project folder after installation, then run /sendbird-cli:sendbird-setup. Follow the CLI plugin setup guide to connect your account and confirm that the CLI targets your test app. Complete browser sign-in yourself when prompted. The CLI Quickstart lists the current Node.js requirements and account setup steps.
Ask Claude Code to build the live chat
Here is the exact request used for Streamly:
Claude Code / Original build request
Build a Twitch-style live stream page in React with my own chat screens on the Chat SDK (call it Streamly, no Twitch branding) with a chat panel beside the video, then use the Sendbird CLI to mute a spamming viewer for a minute and prove their messages are blocked.The request specifies custom React screens on the Sendbird Chat SDK. It also gives the agent an observable acceptance criterion: a muted viewer's message must be rejected.
Claude Code created the application code with guidance from the Client plugin and prepared the test Open channel, streamly_live, through the CLI. During normal use, the Chat SDK connects the React app to Sendbird and handles messaging.
Verify a temporary mute with real message attempts
A disabled input field is only part of the behavior. The agent also needed to check what happened when the muted user attempted to send a message to Sendbird.
In the recorded CLI test, the agent:
- Sent three messages as
streamly_spammerand confirmed that Sendbird accepted them. - Muted that user in
streamly_livefor 60 seconds, then read the moderation record and confirmedis_muted: true. - Attempted another send as the muted user. The SDK returned
900041, indicating that the user was muted. - Read the message history as a viewer and confirmed that the rejected attempt was absent.
- The CLI's Dashboard sign-in ended before the agent could confirm the expiry. After we signed in again, it confirmed that
is_mutedwas false and that a new send was accepted and appeared in the message history.
These two command excerpts show the restriction and the attempted send from the recorded run with CLI 0.4.0:
Recorded CLI commands / Apply the mute
sendbird chat moderation channel mute --type open --id streamly_live --user-id streamly_spammer --seconds 60 --description "Spamming links in Streamly chat" --yesRecorded CLI commands / Attempt a send while muted
sendbird chat message send --as-user streamly_spammer --allow-guest --type open --id streamly_live --message "MUTED-PROBE spam while muted"The send excerpt uses --allow-guest with a test app that permitted user-ID-only connections. For this connection method, the app must have token policy 0, and the test user must never have been issued a token. The flag does not override the app's authentication policy; see Chat development sign-in requirements.
These commands record the test rather than a production authentication recipe. For command options in your installed version, use the Chat command reference.
The 900041 response was the intended result. The mute prevented the attempted send, and the message did not appear in the viewer's history.
Refine the React interface without changing the chat behavior
Once the behavior was in place, we gave Claude Code this second request:
Claude Code / Original design request
Restyle Streamly so it looks and feels like Twitch: a dark theme with a purple accent, a LIVE badge and viewer count on the player, compact one-line chat messages with colored usernames. Keep the name Streamly and don't use Twitch's logo. Only change the look; keep the chat behavior as it is and don't use the Sendbird CLI.
Check the viewer and muted-user screens separately
After the agent's run, our team opened the app as a viewer and as the test spam account. We sent two messages from the spam account, then applied a 60-second mute through the CLI.
The muted user's screen displayed a notice and disabled the composer. During the same 60-second mute, a separate send attempt as that test user was rejected with error code 900041, confirming that the channel mute prevented sending as expected. The viewer's screen showed the moderation notice, and a CLI history check confirmed that the rejected message was absent.
This browser check covered the visible muted state. The earlier agent-run CLI test established that sending resumed after the mute expired.
900041 are visible. The banner text comes from the app; this mute ends on its own after 60 seconds.Connect moderation to your own service
Streamly demonstrates a temporary, channel-specific mute. It does not include automatic spam detection or a video broadcasting backend. For your application, decide who can moderate a channel and which events should trigger a restriction, then implement that policy through the appropriate authenticated service path.
For production sign-in, your server must issue a Sendbird access token or session token for the authenticated user. The Client plugin can write the client code that requests and uses the token; the server endpoint remains your responsibility. Follow Add Chat for the connection flow.
The recorded Claude usage was $3.36 for the initial request and $1.09 for the design request, or $4.45 combined at API-equivalent prices. These figures exclude Sendbird usage and do not represent a guaranteed subscription bill or the cost of a production application.
Start with the Sendbird CLI and Client plugin overview, install the Client plugin, and define a behavior you can verify against the running service.
Start building with Sendbird for free. Add chat to your app with the Client plugin’s Add Chat guide.
Streamly is a demonstration app and is not affiliated with Twitch. No Twitch logo was used.








