this repo has no description
TypeScript 100.0%
7 1 0

Clone this repository

https://tangled.org/dunkirk.sh/irc-slack-bridge
git@knot.dunkirk.sh:dunkirk.sh/irc-slack-bridge

For self-hosted knots, clone URLs may differ based on your setup.

README.md

IRC <> Slack bridge#

This is a little bot in active development to bridge slack and irc for Hackclub!

How do I hack on it?#

Development#

This is written in typescript so pretty easy to get started!

bun install
bun dev

Slack App Setup#

  1. Go to api.slack.com/apps and create a new app
  2. Choose "From an app manifest"
  3. Copy the contents of slack-manifest.yaml and paste it
  4. Install the app to your workspace
  5. Copy the "Bot User OAuth Token" (starts with xoxb-) and "Signing Secret"
  6. Invite the bot to your desired Slack channel: /invite @IRC Bridge

Environment Setup#

Make a .env file with the following:

# Slack Configuration
SLACK_BOT_TOKEN=xoxb-your-bot-token-here
SLACK_SIGNING_SECRET=your-signing-secret-here

# IRC Configuration
IRC_NICK=slackbridge

# Admin users (comma-separated Slack user IDs)
ADMINS=U1234567890

# Server Configuration (optional)
PORT=3000

See .env.example for a template.

Managing Channel and User Mappings#

Channel and user mappings are stored in a SQLite database (bridge.db). You can manage them through:

Using Bun REPL:

bun repl
> import { channelMappings, userMappings } from "./src/db"
> channelMappings.create("C1234567890", "#general")
> userMappings.create("U1234567890", "myircnick")
> channelMappings.getAll()

Using SQLite directly:

bun:sqlite bridge.db
sqlite> SELECT * FROM channel_mappings;
sqlite> INSERT INTO channel_mappings (slack_channel_id, irc_channel) VALUES ('C1234567890', '#general');

How it works#

The bridge connects to irc.hackclub.com:6667 (no TLS) and forwards messages bidirectionally based on channel mappings:

  • IRC → Slack: Messages from mapped IRC channels appear in their corresponding Slack channels
  • Slack → IRC: Messages from mapped Slack channels are sent to their corresponding IRC channels
  • User mappings allow custom IRC nicknames for specific Slack users

The bridge ignores its own messages and bot messages to prevent loops.

If you want to report an issue the main repo is the tangled repo and the github is just a mirror.

© 2025-present Kieran Klukas