{"id":13432569,"url":"https://github.com/ekmartin/slack-irc","last_synced_at":"2025-05-15T20:01:07.752Z","repository":{"id":26903527,"uuid":"30365240","full_name":"ekmartin/slack-irc","owner":"ekmartin","description":"Connects Slack and IRC channels by sending messages back and forth.","archived":false,"fork":false,"pushed_at":"2022-10-12T02:14:35.000Z","size":290,"stargazers_count":587,"open_issues_count":30,"forks_count":153,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-04-08T00:39:21.827Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ekmartin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-05T16:21:24.000Z","updated_at":"2024-10-20T23:20:15.000Z","dependencies_parsed_at":"2022-06-26T15:49:39.992Z","dependency_job_id":null,"html_url":"https://github.com/ekmartin/slack-irc","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekmartin%2Fslack-irc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekmartin%2Fslack-irc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekmartin%2Fslack-irc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekmartin%2Fslack-irc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ekmartin","download_url":"https://codeload.github.com/ekmartin/slack-irc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254414457,"owners_count":22067263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T02:01:13.527Z","updated_at":"2025-05-15T20:01:07.318Z","avatar_url":"https://github.com/ekmartin.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Frameworks"],"sub_categories":["Bridges"],"readme":"# slack-irc [![Join the chat at https://gitter.im/ekmartin/slack-irc](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ekmartin/slack-irc?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge) [![Build Status](https://travis-ci.org/ekmartin/slack-irc.svg?branch=travis)](https://travis-ci.org/ekmartin/slack-irc) [![Coverage Status](https://coveralls.io/repos/github/ekmartin/slack-irc/badge.svg?branch=master)](https://coveralls.io/github/ekmartin/slack-irc?branch=master)\n\n\u003e Connects Slack and IRC channels by sending messages back and forth. Read more [here](https://ekmartin.com/2015/slack-irc).\n\n## Demo\n![Slack IRC](http://i.imgur.com/58H6HgO.gif)\n\n## Installation and usage\n*Note*: [node-irc](https://github.com/martynsmith/node-irc/)\nuses icu-charset-detector as an optional dependency,\nwhich might fail to install depending on how you've installed Node.js.\nslack-irc works fine anyhow though, so no need to worry.\n\nInstalling with npm:\n```bash\n$ npm install -g slack-irc\n$ slack-irc --config /path/to/config.json\n```\n\nor by cloning the repository:\n\n```bash\n$ git clone https://github.com/ekmartin/slack-irc.git \u0026\u0026 cd slack-irc\n$ npm install\n$ npm run build\n$ npm start -- --config /path/to/config.json # Note the extra -- here\n```\n\nIt can also be used as a node module:\n```js\nvar slackIRC = require('slack-irc');\nvar config = require('./config.json');\nslackIRC(config);\n```\n\n## Configuration\n\nslack-irc uses Slack's [bot users](https://api.slack.com/bot-users).\nThis means you'll have to set up a bot user as a Slack integration, and invite it\nto the Slack channels you want it to listen in on. This can be done using Slack's `/invite \u003cbotname\u003e`\ncommand. This has to be done manually as there's no way to do it through the Slack bot user API at\nthe moment.\n\nslack-irc requires a JSON-configuration file, whose path can be given either through\nthe CLI-option `--config` or the environment variable `CONFIG_FILE`. The configuration\nfile needs to be an object or an array, depending on the number of IRC bots you want to run.\n\nThis allows you to use one instance of slack-irc for multiple Slack teams if wanted, even\nif the IRC channels are on different networks.\n\nTo set the log level to debug, export the environment variable `NODE_ENV` as `development`.\n\nslack-irc also supports invite-only IRC channels, and will join any channels it's invited to\nas long as they're present in the channel mapping.\n\n### Example configuration\nValid JSON cannot contain comments, so remember to remove them first!\n```js\n[\n  // Bot 1 (minimal configuration):\n  {\n    \"nickname\": \"test2\",\n    \"server\": \"irc.testbot.org\",\n    \"token\": \"slacktoken2\",\n    \"channelMapping\": {\n      \"#other-slack\": \"#new-irc-channel\"\n    }\n  },\n\n  // Bot 2 (advanced options):\n  {\n    \"nickname\": \"test\",\n    \"server\": \"irc.bottest.org\",\n    \"token\": \"slacktoken\", // Your bot user's token\n    \"avatarUrl\": \"https://robohash.org/$username.png?size=48x48\", // Set to false to disable Slack avatars\n    \"slackUsernameFormat\": \"\u003c$username\u003e\", // defaults to \"$username (IRC)\"; \"$username\" overides so there's no suffix or prefix at all\n    \"ircUsernameFormat\": \"\u003c$username\u003e \", // defaults to \"\u003c$username\u003e\"; \"$username\" overides so there's no suffix or prefix at all\n    \"autoSendCommands\": [ // Commands that will be sent on connect\n      [\"PRIVMSG\", \"NickServ\", \"IDENTIFY password\"],\n      [\"MODE\", \"test\", \"+x\"],\n      [\"AUTH\", \"test\", \"password\"]\n    ],\n    \"channelMapping\": { // Maps each Slack-channel to an IRC-channel, used to direct messages to the correct place\n      \"#slack\": \"#irc channel-password\", // Add channel keys after the channel name\n      \"privategroup\": \"#other-channel\" // No hash in front of private groups\n    },\n    \"ircOptions\": { // Optional node-irc options\n      \"floodProtection\": false, // On by default\n      \"floodProtectionDelay\": 1000 // 500 by default\n    },\n    // Makes the bot hide the username prefix for messages that start\n    // with one of these characters (commands):\n    \"commandCharacters\": [\"!\", \".\"],\n    // Prevent messages posted by Slackbot (e.g. Slackbot responses)\n    // from being posted into the IRC channel:\n    \"muteSlackbot\": true, // Off by default\n    // Sends messages to Slack whenever a user joins/leaves an IRC channel:\n    \"ircStatusNotices\": {\n      \"join\": false, // Don't send messages about joins\n      \"leave\": true\n    },\n    // Prevent messages posted by users on Slack/IRC from being forwarded:\n    \"muteUsers\": {\n      \"irc\": [\"irc-user\"],\n      \"slack\": [\"slack-user\"]\n    }\n  }\n]\n```\n\n`ircOptions` is passed directly to node-irc ([available options](http://node-irc.readthedocs.org/en/latest/API.html#irc.Client)).\n\n## Personal IRC Client\nslack-irc strengths mainly lie in many-to-many communication from Slack to IRC (and vice versa),\nand is thus not very suitable as a makeshift IRC client for one user. If that's\nwhat you need, check out\n[aeirola/slack-irc-client](https://github.com/aeirola/slack-irc-client),\nwhich adds an array of features to solve this problem as smoothly as possible.\n\n## Development\nTo be able to use the latest ES2015+ features, slack-irc uses [Babel](https://babeljs.io).\n\nBuild the source with:\n```bash\n$ npm run build\n```\n\n### Tests\nRun the tests with:\n```bash\n$ npm test\n```\n\n### Style Guide\nslack-irc uses a slightly modified version of the\n[Airbnb Style Guide](https://github.com/airbnb/javascript/tree/master/es5).\n[ESLint](http://eslint.org/) is used to make sure this is followed correctly, which can be run with:\n\n```bash\n$ npm run lint\n```\n\nThe deviations from the Airbnb Style Guide can be seen in  the [.eslintrc](.eslintrc) file.\n\n## Docker\nA third-party Docker container can be found [here](https://github.com/caktux/slackbridge/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekmartin%2Fslack-irc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fekmartin%2Fslack-irc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekmartin%2Fslack-irc/lists"}