Skip to main content

Err is a chatbot designed to be simple to extend with plugins written in Python.

Project description

.. image::


Err 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

It is written and easily extensible in Python.

Err is available as open source software and released under the GPL v3 license.


**Chat servers support**

- `Slack <>`_ (built-in support)
- `Hipchat <>`_ (built-in support)
- `Telegram <>`_ (built-in support)
- `XMPP <>`_ (built-in support)
- IRC (built-in support)
- `Gitter <>`_ (Follow the instructions from `here <>`_ to install it)
- `CampFire <>`_ (Follow the instructions from `here <>`_ to install it)
- `TOX <>`_ (Follow the instructions from `here <>`_ to install it)


After the initial installation and security setup, Err can be administered by just chatting to the bot.

- install/uninstall/update/enable/disable private or public plugins hosted on git
- plugins can be configured from chat
- direct the bot to join/leave Multi User Chatrooms (MUC)
- Security: ACL control feature (admin/user rights per command)
- backup: an integrated command !backup creates a full export of persisted data.
- logs: can be inspected from chat or streamed to `Sentry <>`_

**Developer features**

- Presetup storage for every plugin i.e. ``self['foo'] = 'bar'`` persists the value.
- Webhook callbacks support
- supports `markdown extras <>`_ formatting with tables, embedded images, links etc.
- configuration helper to allow your plugin to be configured by chat
- Graphical and text development/debug consoles
- Self-documenting: your docstrings becomes help automatically
- subcommands and various arg parsing options are available (re, command line type)
- polling support: your can setup a plugin to periodically do something
- end to end test backend

Community and support

If you have a question or want to share your latest plugin creation: feel free to join the chat on `gitter <>`_. Err has also a `google plus community <>`_. You can ping us on Twitter with the hashtag ``#errbot``.
But if you have a bug to report or wish to request a feature, please log them `here <>`_.


Feel free to fork and propose changes on `github <>`_


Err runs under Python 3.3+ and Python 2.7 on Linux, Windows and Mac. For some chatting systems you'll need a key or a login for your bot to access it.


If you can, we recommend to setup a `virtualenv <>`_.

Err may be installed directly from PyPi using pip by issuing::

pip install err

Or if you wish to try out the latest, bleeding edge version::

pip install

**Extra dependencies** only installs the bare minimum dependencies needed to run Err.
Depending on the backend you choose, additional requirements need to be installed.

| Backend | Extra dependencies |
| Slack | - ``slackclient`` |
| XMPP | - ``sleekxmpp`` |
| | - ``pyasn1`` |
| | - ``pasn1-modules`` |
| | - ``dnspython3`` (py3) |
| | - ``dnspython`` (py2) |
| Hipchat | XMPP + ``hypchat`` |
| irc | - ``irc`` |
| external | See their ``requirements.txt`` |


After installing Err, you must create a data directory somewhere on your system where
config and data may be stored. Find the installation directory of Err, then copy the
file <install_directory>/errbot/ to your data directory as

(If you installed Err via pip, the installation directory will most likely be

Read the documentation within this file and edit the values as needed so the bot can
connect to your chosen backend (XMPP, Hipchat, Slack ...) server.

**Starting the daemon**

The first time you start Err, it is recommended to run it in foreground mode. This can
be done with::


In many cases, just typing will be enough as it is generally added to the PATH
automatically. Please pass -h or --help to to get a list of supported parameters.
Depending on your situation, you may need to pass --config or --backend when starting

If all that worked, you can now use the -d (or --daemon) parameter to run it in a
detached mode::

<path_to_install_directory>/scripts/ --daemon

**Hacking on Err's code directly**

It's important to know that as of version 2.0, Err is written for Python 3. In order
to run under Python 2.7 the code is run through 3to2 at install time. This means that
while it is possible to run Err under Python 3.3+ directly from a source checkout, it
is not possible to do so with Python 2.7. If you wish to develop or test with Err's
code under 2.7, you must run::

python develop

Interacting with the Bot

After starting Err, you should add the bot to your buddy list if you haven't already.
You can now send commands directly to the bot, or issue commands in a chatroom that
the bot has also joined.

To get a list of all available commands, you can issue::

!help full

If you just wish to know more about a specific command you can issue::

!help command

**Managing plugins**

To get a list of public plugin repos you can issue::


To install a plugin from this list, issue::

!repos install <name of plugin>

You can always uninstall a plugin again with::

!repos uninstall <plugin>

You will probably want to update your plugins periodically. This can be done with::

!repos update all

Note: Please pay attention when you install a plugin, it may have additional
dependencies. If the plugin contains a requirements.txt then Err wil automatically
check them and warn you when you are missing dependencies.

Writing plugins

Writing your own plugins is extremely simple. As an example, this is all it takes
to create a "Hello, world!" plugin for Err::

from errbot import BotPlugin, botcmd

class Hello(BotPlugin):
"""Example 'Hello, world!' plugin for Err"""

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 <>`_.


``Release date: 2015-08-17``

We have decided to promote this release as the v3 \\o/.

This document includes all the changes since the last stable version (2.2.0).

If you have any difficulty using this new release, feel free to jump into our `dev room on gitter <>`_.

New and noteworthy

- backends are now plugins too
- new Slack backend (see the `config template <>`_ for details)
- new Telegram backend
- new Gitter backend (see `the gitter backend repo <>`_ for more info about installing it)
- completely new rendering engine: now all text from either a plugin return or a template is **markdown extras**
- you can test the various formatting under your backend with the ``!render test`` command.
- the text backend exposes the original md, its html representation and ansi representation so plugin developers can anticipate what the rendering will look like under various backends
See the screenshots below: Slack_, Hipchat_, IRC_, Gitter_ and finally Text_.

- completely revamped backup/restore feature (see ``!help backup``).
- Identifiers are now generic (and not tight to XMPP anymore) with common notions of ``.person`` ``.room`` (for MUCIdentifiers) ``.client`` ``.nick`` and ``.displayname`` see `this doc <>`_ for details.
- New ``!whoami`` command to debug identity problems for your plugins.
- New ``!killbot`` command to stop your bot remotely in case of emergency.
- New support for `argparse style command arguments <>`_ with the ``@arg_botcmd`` decorator.
- IRC: file transfer from the bot is now supported (DCC)

Minor improvements

- hipchat endpoint can be used (#348)
- XMPP server parameter can be overriden
- deep internal reorganisation of the bot: the most visible change is that internal commands have been split into internal plugins.
- IRC backend: we have now a reconnection logic on disconnect and on kick (see ``IRC_RECONNECT_ON_DISCONNECT`` in the config file for example)

Stuff that might break you

- if you upgrade from a previous version, please install: ``pip install markdown ansi Pygments "pygments-markdown-lexer>=0.1.0.dev29"``
- you need to add the type of backend you use in your config file instead of the command like. i.e. ``BACKEND = 'XMPP'``
- XMPP properties ``.node``, ``.domain`` and ``.resource`` on identifiers are deprecated, a backward compatibility layer has been added but we highly encourage you to not rely on those but use the generic ones from now on: ``.person``, ``.client`` and for MUCOccupants ``.room`` on top of ``.person`` and ``.client``.
- To create identifiers from a string (i.e. if you don't get it from the bot itself) you now have to use ``build_identifier(string)`` to make the backend parse it
- command line parameter -c needs to be the full path of your config file, it allows us to have different set of configs to test the bot.
- campfire and TOX backends are now external plugins: see `the tox backend repo <>`_ and `the campfire backend repo <>`_ for more info about installing them.
- any output from plugin is now considered markdown, it might break some of your output if you had any markup characters (\#, \-, \* ...).
- we removed the gtalk support as it is going away.

Bugs squashed

- plugin loader do not traverse __pycache__ and dotted directory anymore
- import error at install time.
- IRC backend compatibility with gitter
- Better logging to debug plugin callbacks
- Better dependency requirements ( vs requirements.txt)
- builtins are now named core_plugins (the plan is to move more there)
- a lot of refactoring around globals (it enabled the third party plugins)
- git should now work under Windows
- None was documented as a valid value for the IRC rate limiter but was not.
- removed xep_0004 from the xmpp backend (it was deprecated)

since 3.0.0-rc1:

- imtext was removing the \` for Slack
- corrected the leaking <code><pre> in text/ansi
- fixed a restart loop in Telegram
- clear formatting in the Slack backend for angle brackets [thx @RobSpectre]
- XMPP: allow slashes in resources

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for err, version 3.0.0
Filename, size File type Python version Upload date Hashes
Filename, size err-3.0.0.tar.gz (170.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page