• Stars
    star
    3,116
  • Rank 14,427 (Top 0.3 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 12 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Errbot is a chatbot, a daemon that connects to your favorite chat service and bring your tools and some fun into the conversation.

image

image

Latest Version

License

Join the chat at https://gitter.im/errbotio/errbot

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.

Features

Chat servers support

Built-in

With add-ons

Administration

After the initial installation and security setup, Errbot can be administered by just chatting to the bot (chatops).

  • 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

  • Very easy to extend in Python! (see below)
  • Presetup storage for every plugin i.e. self['foo'] = 'bar' persists the value.
  • Conversation flows to track conversation states from users.
  • Webhook callbacks support
  • supports markdown extras formatting with tables, embedded images, links etc.
  • configuration helper to allow your plugin to be configured by chat
  • Text development/debug consoles
  • Self-documenting: your docstrings become 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
  • card rendering under Slack

Community and support

If you have:

You can also ping us on Twitter with the hashtag #errbot.

Installation

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.

  1. Install errbot from pip
  2. Make a directory somewhere (here called errbot) to host Errbot's data files
  3. Initialize the directory
  4. Try out Errbot in text mode
$ 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 !help to get started.

Adding support for a chat system

For the built-ins, just use one of those options telegram, IRC, XMPP with pip, you can still do it after the initial installation to add the missing support for example :

$ pip install "errbot[irc]"

For the external ones (Slack, Discord, Gitter, Skype, 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.py file 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 -T to 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:

errbot --daemon

Interacting with the Bot

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:

!help

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

!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:

!repos search jira

To install a plugin from this list, issue:

!repos install <name of repo>

For example !repos install errbotio/err-imagebot.

Writing plugins

Writing your own plugins is extremely simple. errbot --init will have installed in the plugins subdirectory a plugin called err-example you can use as a base.

As an example, this is all it takes to create a "Hello, world!" plugin for Errbot:

from errbot import BotPlugin, botcmd

class 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.

Contribution to Errbot itself

Feel free to fork and propose changes on github

More Repositories

1

err-backend-mattermost

Python
42
star
2

err-backend-slackv3

Slack Events and RTM backend for Errbot
Python
27
star
3

err-backend-discord

Backend for Discord for Errbot
Python
23
star
4

err-backend-gitter

gitter.im backend for err
Python
22
star
5

err-storage-sql

Errbot storage plugin for SQL databases.
Python
13
star
6

err-poll

A simple voting plugin for Errbot.
Python
11
star
7

plugin-skeleton

A plugin skeleton for the Err chatbot
Python
10
star
8

err-gitbot

Plugin for errbot that watchs your git repositories
Python
10
star
9

err-code

Make the bot execute code snippet in C, CPP and Python
Python
8
star
10

err-storage-redis

Errbot redis backend plugin
Python
8
star
11

err-otp

OTP 2 factor auth for errbot
Python
7
star
12

err-devops-borat

random funny quotes about software development
Python
6
star
13

err-backend-skype

Skype backend for errbot
Python
5
star
14

err-elizabot

a classic electronic shrink for the chatbot err
Python
5
star
15

err-guess-a-number

Example plugin for a simple Flow.
Python
5
star
16

err-nettools

Various network tools for err
Python
4
star
17

err-github

A github <-> err bridge
Python
4
star
18

err-storage-firebase

This is a firebase storage plugin for errbot
Python
4
star
19

err-backend-tox

This is the TOX backend for errbot
Python
4
star
20

err-phonevalet

manage your phonecalls and sms by chatting
Python
3
star
21

err-calcbot

a smart calculator, unit converter and math solver for err
Python
3
star
22

err-pypi

some pypi commands for err bot
Python
3
star
23

err-tourney

a ranking and tournament system for err
Python
3
star
24

err-storage-gcd

Google Cloud Datastore storage plugin for errbot
Python
2
star
25

err-dictbot

A simple err plugin that gives you the definition of a word
Python
2
star
26

err-imagebot

plugin for err : query google image, stockphotos, xkcd, dilbert, posters ...
Python
2
star
27

err-helloworld

A simple plugin which says hello (used for integration tests)
Python
2
star
28

err-coderwall

an err plugin to query coderwall
Python
2
star
29

errbot-version-server

This is the version server for errbot on App Engine.
Go
1
star
30

err-tv

List you any data about tv shows, airdates, episodes etc ...
Python
1
star
31

err-cards-tester

Tester for Errbot cards feature.
Python
1
star
32

err-time

an err plugin to give the current time at a given place
Python
1
star
33

err-stalkerbot

a bot that tell you the last time it saw somebody (plugin for err)
Python
1
star
34

err-social

Google plus bridge plugin for err
Python
1
star
35

err-import-example

This repo shows you how you can import things from a common module for your plugins.
Python
1
star
36

err-backend-campfire

This is the campfire backend for errbot
Python
1
star