"In Norse mythology, Bivrost is a burning rainbow bridge that reaches between Midguard and Asgard, the realm of the gods." - WikiPedia
Bivrost is a asp.net core application that offers several overlay endpoints, hosts a Twitch.tv bot and bridges the two together to display chat events in OBS while streaming.
As long as you have the development dependencies installed, the application can be run on your bare metal machine.
- Clone the repository:
git clone https://github.com/NotMyself/bivrost.git
. - Change directory into the cloned repository
cd bivrost
. - Run script
scripts/local-init
. - Run the command
dotnet user-secrets set BIVROST_TWITCH_BOT_USER_NAME {bot-user-name}
. - Run the command
dotnet user-secrets set BIVROST_TWITCH_BOT_ACCESS_TOKEN {bot-access-token}
. - Run the command
dotnet user-secrets set BIVROST_TWITCH_BOT_CHANNEL {twitch-channel}
.
- Note: You must supply valid values for the BIVROST_ environment variables, see this for instructions on how to obtain these values.
- Run script
scripts/local-start
.
The application can easily be executed locally with no development dependencies using Docker.
- Clone the repository:
git clone https://github.com/NotMyself/bivrost.git
. - Change directory into the cloned repository
cd bivrost
. - Run script
scripts/image-create
. - Run script
BIVROST_TWITCH_BOT_USER_NAME={bot-user-name} BIVROST_TWITCH_BOT_ACCESS_TOKEN={bot-access-token} BIVROST_TWITCH_BOT_CHANNEL={twitch-channel} scripts/image-start
.- Note: You must supply valid values for the BIVROST_ environment variables, see this for instructions on how to obtain these values.
If you want to start using Bivrost as is with no customizations, this can easily be done with Zeit's Now platform.
- Create a Zeit Now account.
- Add environment secrets to your Now account for each environment variable listed.
- Note: This currently can only be done using the Now CLI.
- Now CLI Command, ex:
now secrets add BIVROST_TWITCH_BOT_CHANNEL iamnotmyself
- Browes to the repository on Github: Bivrost
- Click the Fork button located on the right of the screen just under the main menu.
- Select the GitHub account you want to fork the repository too.
- Edit the now.json file and remove the alias property.
- Note: This tells my deployment to automatically assign this alias on successful deployments. You can set up something similar, details.
- Connect the Now for GitHub application to your account.
Once complete, Now will deploy an instance of Bivrost on every clean commit to your master branch. By default, it will also do a test deployment for app pull requests submitted.
Bivrost uses several bits of information to connect to stream chat.
In most cases, you can use your Twitch username for both the bot username and channel. This will make the bot appear as you in chat.
If you would like to have a seperate bot username from your own, you will need to create that account on Twitch and use it to generate your access token.
You will need to generate an OAuth authorization token with several specific scopes applied to it.
- Navigate to Twitch Token Generator.
- Select the Custom Scope Token option in the popup dialog.
- Ensure the following scopes are enabled:
user_read
user_blocks_edit
- TODO: Figure out the exact scopes needed, for now select all.
- Click the Generate Token! button.
- You will be redirected Twitch, authenticate if needed.
- Click the Authorize button to grant Twitch Token Generator concent to access your account with the listed scopes.
- Verify you are not a robot.
- Click the Copy button next to Access Token.
Env Var | Note |
---|---|
BIVROST_TWITCH_BOT_USER_NAME | Twitch Account Username for Bot |
BIVROST_TWITCH_BOT_ACCESS_TOKEN | OAuth Access Token for Twitch Account |
BIVROST_TWITCH_BOT_CHANNEL | Twitch Chat Channel for Bot to join and listen. |
BIVROST_TWITCH_CLIENT_ID | |
BIVROST_TWITCH_CLIENT_SECRET |
When the bot is successfully configured, it will announce it's arrival in chat like this: