Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

HiveMind Twitch Bridge

This bridge relays a Twitch channel's chat to a HiveMind hub.

The bridge is a HiveMind satellite. Its input and output are Twitch IRC chat instead of a microphone. A chat message that carries a trigger tag becomes an utterance sent to the hub. The hub's spoken reply is echoed back into the channel, addressed to the user. Any HiveMind hub, and the OVOS skills behind it, becomes a Twitch chat bot.

Twitch chat (IRC)  ⇄  HiveMind-twitch-bridge  ⇄  HiveMind hub  ⇄  OVOS skills

Prerequisites

  • A running HiveMind hub (hivemind-core) reachable over the network, and a HiveMind access key for this bridge (hivemind-core add-client).
  • A Twitch account for the bot and a chat OAuth token for it. Generate one at https://twitchapps.com/tmi/ (the token has the form oauth:...).
  • The channel name whose chat the bot should join.

Install

Install from a checkout:

git clone https://github.com/JarbasHiveMind/HiveMind-twitch-bridge
cd HiveMind-twitch-bridge
pip install .

This installs the hivemind-twitch-bridge console entry point. Runtime dependencies: hivemind-bus-client, ovos-bus-client, ovos-utils.

Quickstart

1. Register the bridge on the hub (where hivemind-core is installed):

hivemind-core add-client --name twitch-bridge \
  --access-key "your-access-key" --password "your-password"

2. Run it. The bridge connects to the hub as a satellite and joins the Twitch channel:

hivemind-twitch-bridge \
  --channel your_channel \
  --oauth oauth:your_chat_token \
  --tag @bot --tag @jarbas \
  --host wss://127.0.0.1 --port 5678 \
  --access-key your-access-key --password your-password

You can also call connect_twitch_to_hivemind(...) from twitch_bridge.__main__ directly in Python.

3. Send a message. In the channel's chat, include a trigger tag:

@bot what time is it?

The bridge strips the tag, forwards the message to the hub, and posts the reply back to the channel as @user , <answer>.

Configuration

hivemind-twitch-bridge / connect_twitch_to_hivemind(...) options:

Option Description Default
--channel Twitch channel name to join none
--oauth Twitch chat OAuth token (oauth:...) none
--tag Trigger tag (repeatable). A chat message containing one is forwarded @bot
--nickname Twitch bot nickname bot
--lang Utterance language en-us
--host HiveMind hub host (wss:// / ws://) wss://127.0.0.1
--port HiveMind hub port 5678
--access-key HiveMind access key None
--password HiveMind password None
--crypto-key Optional HiveMind payload crypto key None
--self-signed Accept self-signed SSL certificates off

See docs/configuration.md for the full parameter reference.

Troubleshooting

  • Bot never answers: confirm the chat message contains a trigger tag. Tags are matched case-insensitively and stripped before forwarding.
  • Cannot connect to Twitch: verify the OAuth token is current (regenerate at https://twitchapps.com/tmi/) and the channel name is spelled correctly.
  • No reply posted: confirm the hub is reachable and the access key is registered (hivemind-core list-clients), and that the hub produces a speak for the answer.

Documentation

  • Setup walkthrough: from nothing to a working bot, step by step.
  • Operator setup: getting the bot's Twitch account and chat OAuth token, registering the bridge on a HiveMind hub, the run command, security notes, and live-test environment variables.
  • Configuration reference: every credential and parameter the bridge accepts.
  • Examples: a worked conversation and a standalone Twitch echo bot for testing credentials.

Related projects

License

See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hivemind_twitch_bridge-0.0.3a2.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hivemind_twitch_bridge-0.0.3a2-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file hivemind_twitch_bridge-0.0.3a2.tar.gz.

File metadata

  • Download URL: hivemind_twitch_bridge-0.0.3a2.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hivemind_twitch_bridge-0.0.3a2.tar.gz
Algorithm Hash digest
SHA256 1e889846a7b27421283318f7d762cd2491fd09c487f6e6ed305eb11f996c2fd7
MD5 526d3b245bc3736c63e4ac3c5a8a7f64
BLAKE2b-256 c7ff1c1246182722876010e15885c1b27c7f369763ca25f425a53c87124c4410

See more details on using hashes here.

File details

Details for the file hivemind_twitch_bridge-0.0.3a2-py3-none-any.whl.

File metadata

File hashes

Hashes for hivemind_twitch_bridge-0.0.3a2-py3-none-any.whl
Algorithm Hash digest
SHA256 f144b8ece6a5457d910a1fcdbadc1b1ae4e99b8c0fbe20a5bbb2e936a67e0176
MD5 19e2cd36d66ff184edd451dc5034e1a6
BLAKE2b-256 bae5f2d4896dfea29829d8f2dc8aadbd939e77889da94150ab3b44b19dab8594

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page