MCPcopy Index your code
hub / github.com/Kruiser8/Kruiz-Control

github.com/Kruiser8/Kruiz-Control @2.3.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.3.3 ↗ · + Follow
309 symbols 712 edges 41 files 156 documented · 50%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Kruiz Control

Kruiz Control enables a pseudo code approach to manage and automatically handle Twitch chat and events, OBS or SLOBS, and StreamElements or Streamlabs alerts.

Tutorial | Download | Updating | Documentation | Settings

@Kruiser8 | Trello (Roadmap) | Patreon | Support Discord

Table of Contents


Setup Guide

  • Add the index.html to OBS or SLOBS as a browser source.
  • Fill out the settings files in the settings folder.
  • Type !example in your twitch chat. If your user responds with Success! It worked!, you're good to go!
  • Customize the triggers.txt with your own triggers from the the documentation.

Note: If you're on OBS v27 or lower, you'll also have to install the OBS Websocket Plugin. Reopen OBS after installing.


Compatibility

Kruiz Control supports - Twitch Channel Management - Twitch Chat - Twitch Events (alerts, channel points, hype trains) - Streamlabs Alerts - StreamElements Alerts - OBS scene, source, and filter changes - SLOBS scene and source changes - Voicemod Voice Changer control - Playing music (mp3, wav, ogg) - Timers (triggering on an interval) - Sending API calls

and more in the documentation!

The script should run on any broadcast software that supports browser sources, however only OBS and SLOBS support changing scenes and sources. OBS.Live is supported.


Installation

Add as Browser Source

Add the index.html file as a browser source within your broadcast software. It is recommended to add this source to one scene that is included in all other scenes (like your alert scene) rather than recreate this source in every scene.

Settings

Before the script will work, you'll need to fill out all of the settings files. Please see the settings description for more information.

Steps for adding to OBS/SLOBS

  • In OBS, under Sources click the + icon to add a new Browser source.
  • Name it and select OK.
  • Check the Local file checkbox.
  • Click Browse and open the index.html file within the Kruiz Control script directory.
  • Recommended to set the width/height to 100 or less to reduce the size of the source.

OBS Websocket

In OBS, click Tools > WebSockets Server Settings and enable the websocket server.

It is highly recommended to use a password!


Usage

Pseudo Code Format

For information on the pseudo code format, please see the documentation.

triggers.txt

Setup your triggers inside of this file if you do not need actions to be run one after another.

As an example, if the below is in the triggers.txt file, then both sounds can be played at the same time.

triggers.txt

OnTWChannelPoint SHIKAKA
Play 30 wait Shikaka.mp3

OnCommand sbvm 0 !intervention
Play 45 nowait MashiahMusic__Kygo-Style-Melody.wav

fileTriggers.txt and the triggers folder

When you need events to be run one-after-another, create a file in the triggers folder and add the name of the file to fileTriggers.txt.

As an example, here's a setup to make sure multiple OBS scene changing events don't happen simultaneously.

fileTriggers.txt

obs.txt

triggers/obs.txt

OnSLDonation
OBS Scene DonationCelebration

OnCommand mb 0 !brb
OBS Scene BRB

#noqueue

If you want to organize your events into files but don't want the events to queue (run one-after-another), then add #noqueue as the top line of the file. This will prevent the events from queueing within the file.

The below allows both events to run simultaneously.

Example: triggers/obs.txt

#noqueue
OnSLDonation
OBS Scene DonationCelebration

OnCommand mb 0 !brb
OBS Scene BRB

sounds folder

In order to use a sound with Play, add the sound file to the sounds folder. The supported audio formats are mp3, wav, and ogg.


FAQ

XSplit Support

The script should work with XSplit BUT the OBS-like functionality will not work. XSplit does not provide a direct websocket interface to do such actions. It may be possible to implement a plugin that provides a websocket interface to connect with xsplit. If you know a way to achieve this, please reach out.

Support for Youtube Alerts

I can definitely add support for Youtube alerts from Streamlabs. I just haven't had the time to implement it yet.

More investigation time is needed to implement Youtube with StreamElements.

Support for Youtube Chat

Potentially if I can find the libraries to implement it. Again, if you know a way to achieve this, please reach out via twitter or discord.

Will you support X

Please reach out if you have any ideas or other questions that were not covered in the documentation.

Discord: Kruiz Control Support Discord

Twitter: @Kruiser8


Support the Project

There are a number of ways to support this project.

I do take commissions to implement custom functionality when necessary. Please reach out if you have a specific request.


Associated Projects


Credits

License

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 4.0 Generic License.

Core symbols most depended-on inside this repo

getInputs
called by 209
js/parser.js
wrapAsync
called by 37
js/utils/async.js
set
called by 32
js/utils/idb-service.js
readFile
called by 26
js/utils/utils.js
getIdFromUser
called by 25
js/utils/utils.js
getAction
called by 23
js/parser.js
slice
called by 22
js/utils/async.js
send
called by 22
js/voicemod/voicemod-socket.js

Shape

Function 201
Class 62
Method 46

Languages

TypeScript100%

Modules by API surface

js/utils/async.js145 symbols
js/utils/utils.js12 symbols
js/obs/obs-websocket.js12 symbols
js/utils/idb-service.js9 symbols
js/parser.js7 symbols
js/utils/shlex.js6 symbols
js/slobs/slobsHandler.js5 symbols
js/voicemod/voicemodHandler.js4 symbols
js/variable/variableHandler.js4 symbols
js/twitch/twitchHandler.js4 symbols
js/twitch/twitch-api.js4 symbols
js/tts/ttsHandler.js4 symbols

For agents

$ claude mcp add Kruiz-Control \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page