Errbot is a chatbot, a daemon that connects to your favorite chat service and bring your tools and some fun into the conversation.
.. image:: https://errbot.readthedocs.org/en/latest/_static/errbot.png :target: http://errbot.io
|
.. image:: https://github.com/errbotio/errbot/workflows/Python%20package/badge.svg :target: https://github.com/errbotio/errbot/actions
.. image:: https://img.shields.io/pypi/v/errbot.svg :target: https://pypi.python.org/pypi/errbot :alt: Latest Version
.. image:: https://img.shields.io/badge/License-GPLv3-green.svg :target: https://pypi.python.org/pypi/errbot :alt: License
.. image:: https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg :target: https://gitter.im/errbotio/errbot?utmsource=badge&utmmedium=badge&utmcampaign=pr-badge&utmcontent=badge :alt: Join the chat at https://gitter.im/errbotio/errbot
|
Errbot is a chatbot. It allows you to start scripts interactively from your chatrooms for any reason: random humour, chatops, starting a build, monitoring commits, triggering alerts...
It is written and easily extensible in Python.
Errbot is available as open-source software and released under the GPL v3 license.
Chat servers support ~~~~~~~~~~~~~~~~~~~~
Built-in
Hipchat support_
Slack support_
Telegram support_
XMPP support_
With add-ons
CampFire_ (See
instructions__)
Cisco Spark_ (See
instructions__)
Discord_ (See
instructions__)
Gitter support_ (See
instructions__)
Mattermost_ (See
instructions__)
RocketChat_ (See
instructions__)
Skype_ (See
instructions__)
TOX_ (See
instructions__)
VK_ (See
instructions__)
Zulip_ (See
instructions__)
Administration ~~~~~~~~~~~~~~
After the initial installation and security setup, Errbot can be administered by just chatting to the bot (chatops).
Developer features ~~~~~~~~~~~~~~~~~~
self['foo'] = 'bar'persists the value.
markdown extras_ formatting with tables, embedded images, links etc.
If you have:
errbotio/errbot on Gitter_.
Stackoverflow_ with the tags
errbotand
python.
GitHub project page_.
You can also ping us on Twitter with the hashtag
#errbot.
Prerequisites ~~~~~~~~~~~~~
Errbot runs under Python 3.6+ on Linux, Windows and Mac. For some chatting systems you'll need a key or a login for your bot to access it.
Quickstart ~~~~~~~~~~
We recommend to setup a
virtualenv_.
errbotfrom pip
errbot) to host Errbot's data files
.. code:: bash
$ pip install errbot $ mkdir errbot; cd errbot $ errbot --init $ errbot
It will show you a prompt
>>>so you can talk to your bot directly! Try
!helpto get started.
Adding support for a chat system ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For the built-ins, just use one of those options
slack, hipchat, telegram, IRC, XMPPwith pip, you can still do it after the initial installation to add the missing support for example ::
$ pip install "errbot[slack]"
For the external ones (Skype, Gitter, Discord etc ...), please follow their respective github pages for instructions.
Configuration ~~~~~~~~~~~~~
In order to configure Errbot to connect to one of those chat systems you'll need to tweak the
config.pyfile generated by
errbot --init.
To help you, we have a documented template available here:
config-template.py_.
Note: even if you changed the BACKEND from the configuration, you can still use
errbot -Tto test out your instance locally in text mode.
Starting Errbot as a daemon ~~~~~~~~~~~~~~~~~~~~~~~~~~~
If all that worked, you can now use the -d (or --daemon) parameter to run it in a detached mode:
.. code:: bash
errbot --daemon
After starting Errbot, you should add the bot to your buddy list if you haven't already. You'll need to invite the bot explicitly to chatrooms on some chat systems too. You can now send commands directly to the bot!
To get a list of all available commands, you can issue:
.. code:: bash
!help
If you just wish to know more about a specific command you can issue:
.. code:: bash
!help command
Managing plugins ~~~~~~~~~~~~~~~~
You can administer the bot in a one-on-one chat if your handle is in the BOT_ADMINS list in
config.py.
For example to keyword search in the public plugin repos you can issue:
.. code:: bash
!repos search jira
To install a plugin from this list, issue:
.. code:: bash
!repos install
For example
!repos install errbotio/err-imagebot.
Writing your own plugins is extremely simple.
errbot --initwill have installed in the
pluginssubdirectory a plugin called
err-exampleyou can use as a base.
As an example, this is all it takes to create a "Hello, world!" plugin for Errbot:
.. code:: python
from errbot import BotPlugin, botcmdclass Hello(BotPlugin): """Example 'Hello, world!' plugin for Errbot"""
@botcmd def hello(self, msg, args): """Return the phrase "Hello, world!" to you""" return "Hello, world!"
This plugin will create the command "!hello" which, when issued, returns "Hello, world!" to you. For more info on everything you can do with plugins, see the
plugin development guide_.
Feel free to fork and propose changes on
github_