
Hubot
A framework for building your own chat bots that run scripts and connect to chat services.
- Stars
- 16.8k
- Forks
- 3.7k
- Licence
- MIT
- Language
- JavaScript
- Last update
- 5 days ago
- Type
- Library
What it is
Hubot is a JavaScript framework for building chat bots, modeled after GitHub's original Campfire bot. It is distributed as an npm library: you create your own bot instance, extend it with scripts, and connect it to chat services through adapters. The README also describes a command system for slash-style commands with confirmation for actions that have side effects, permissions, and built-in help.
- Create a new bot instance pointed at a chat adapter such as Slack or Discord using npx hubot --create
- Write scripts in the scripts folder that respond to messages in chat
- Register commands like ticket creation with arguments, aliases, and confirmation before side effects
- Restrict sensitive commands to specific chat rooms or, with a permission provider, to user roles
Great for
- Developers who want a self-hosted chat bot they can customize with JavaScript
- Teams that use a chat service with an existing Hubot adapter such as Slack, Discord, MS Teams, or IRC
- People who want scripted chat automation for their own internal workflows
Not ideal for
- Non-developers looking for a ready-made bot with no coding, since the README says you build your own bot using scripts
- People who only want a hosted chatbot service, because this is a framework you run yourself
- Projects that need an AI assistant out of the box, since the README does not describe built-in AI features
How to get it
- 1
Install with a package manager
You'll need: Node.js
Create your own Hubot instance with the Slack adapter
npx hubot --create myhubot --adapter @hubot-friends/hubot-slack - 2
Run it
- Run npx hubot --create myhubot with an adapter flag for your chat service
- Review scripts/example.mjs in the new myhubot folder
- Create additional scripts in the scripts folder
- Start your bot and address it in chat, for example @hubot help
- 3
Get the most out of it
- Use robot.commands.register to define slash-style commands with typed arguments and aliases
- Set sideEffects on commands that change external systems so users must confirm with yes or no
- Use permissions.rooms to limit sensitive commands to specific chat rooms
- Provide a permissionProvider to enable role-based permission checks
- Use @hubot help search to discover commands by keyword, alias, or description
Downloads
Strengths
- Well-established project with a long history, modeled on a known GitHub bot
- Adapter-based design lets one bot logic run on several chat services
- Command bus includes confirmation for side-effect actions, room-based permissions, and built-in help
Trade-offs
- Requires JavaScript or Node.js knowledge to write scripts and run a bot
- Recent major versions changed the codebase (v11 removed CoffeeScript and moved to ESM), so older tutorials may not match
- Role-based permissions are ignored unless you supply your own permissionProvider
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| hubot (this) | 16.8k | Library | intermediate | 5 days ago | Developers who want a self-hosted chat bot they can customize with JavaScript |
| botkit | 11.6k | Library | intermediate | 2.4 years ago | Developers maintaining an existing Botkit bot on Slack, Messenger, Twilio SMS, or Webex |
| EverydayWechat | 10.3k | App | intermediate | 5.4 years ago | Developers comfortable editing YAML and running Python scripts |
| ccxt | 44.7k | Library | intermediate | 4 days ago | Developers building trading bots or algorithmic trading software |
| discord.py | 16.2k | Library | intermediate | 2 months ago | Python developers who want to build a Discord bot |
| awesome-free-chatgpt | 21.3k | Curated list | beginner | 1.4 years ago | People who want to try a chatbot without paying or creating an account |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.