• Stars
    star
    6,298
  • Rank 6,334 (Top 0.2 %)
  • Language
    Go
  • License
    GNU Affero Genera...
  • Created over 10 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

A flexible event/agent & automation system with lots of bees 🐝

Beehive

Build Status Go ReportCard GoDoc

Beehive is an event and agent system, which allows you to create your own agents that perform automated tasks triggered by events and filters. It is modular, flexible and really easy to extend for anyone. It has modules (we call them Hives), so it can interface with, talk to, or retrieve information from Twitter, Tumblr, Email, IRC, Jabber, RSS, Jenkins, Hue - to name just a few. Check out the full list of available Hives in our Wiki.

Connecting those modules with each other lets you create immensly useful agents.

Here are just a few examples of things Beehive could do for you:

  • Re-post tweets on your Tumblr blog
  • Forward incoming chat messages to your email account
  • Turn on the heating system if the temperature drops below a certain value
  • Run your own IRC bot that lets you trigger builds on a Jenkins CI
  • Control your Hue lighting system
  • Notify you when a stock's price drops below a certain value

beehive's Logo

Installation

Packages & Binaries

You can find even more official releases here.

Deployment Tools

  • Docker: docker run --name beehive -d -p 8181:8181 fribbledom/beehive
  • Ansible

From source

Beehive requires Go 1.13 or higher. Make sure you have a working Go environment. See the install instructions.

The recommended way is to fetch the sources and run make.

git clone --recursive https://github.com/muesli/beehive.git
cd beehive
make

You can build and install the beehive binary like other Go binaries out there (go get) but you'll need to make sure Beehive can find the assets (images, javascript, css, etc). See the Troubleshooting/Notes section for additional details.

Run beehive --help to see a full list of options.

Configuration

Think of Hives as little plugins, extending Beehive's abilities with events you can react on and actions you can execute.

Just as examples, there's a Twitter plugin that can

  • react to someone you follow posting a tweet (an event)
  • post a new tweet for you (an action)
  • ...

or an RSS plugin that lets you

  • monitor RSS feeds and react on new feed items (another event)

or an email plugin that gives you the ability to

  • send emails (another action)

Each Hive lets you spawn one or multiple Bees in it, all working independently from another. That allows you to create separate plugin instances, e.g. one email-Bee for your private mail account, and another one for your work email.

Creating Bees

Sounds complicated? It's not! Just for fun, let's setup Beehive to send us an email whenever an RSS feed gets updated. Start beehive and open http://localhost:8181/ in your browser. Note that Beehive will create a config file beehive.conf in its current working directory, unless you specify a different file with the -config option.

Note: If you built Beehive with go build instead of make you will have to start beehive from within its source directory in order for it to find all the resources for the admin interface. Also see the Troubleshooting & Notes section of this README.

The admin interface will present you with a list of available Hives. We will need to create two Bees here, one for the RSS feed and one for your email account.

New Bees

Setting up a Chain

Now we will have to create a new Chain, which will wire up the two Bees we just created. First we pick the Bee & Event we want to react on, then we pick the Bee we want to execute an Action with. The RSS-Bee's event gives us a whole set of parameters we can work with: the feed item's title, its links and description among others. You can manipulate and combine these parameters with a full templating language at your disposal. For example we can set the email's content to something like:

Title: {{.title}} - Link: {{index .links 0}}

Whenever this action gets executed, Beehive will replace {{.title}} with the RSS event's title parameter, which is the title of the feed item it retrieved. In the same manner {{index .links 0}} becomes the first URL of this event's links array.

New Chain

That's it. Whenever the RSS-feed gets updated, Beehive will now send you an email! It's really easy to make various Bees work together seamlessly and do clever things for you. Try it yourself!

You can find more information on how to configure Beehive and examples in our Wiki.

Troubleshooting & Notes

The web interface and other resources are embedded in the binary by default. When using make noembed, Beehive tries to find those files in its current working directory, so it's currently recommended to start Beehive from within its git repository, if you plan to use the web interface.

Should you still not be able to reach the web interface, check if the config directory in the git repository is empty. If that's the case, make sure the git submodules get initialized by running git submodule update --init.

The web interface does not require authentication yet. Beehive by default accepts all connections from the loopback device only.

If you want to bind Beehive to a different interface/address, run Beehive with the -bind and -canonicalurl parameters. For example:

beehive -bind "192.168.0.1:8181" -canonicalurl "http://192.168.0.1:8181"

or

docker run --name beehive -d -e CANONICAL_URL="http://192.168.0.1:8181" -p 8181:8181 fribbledom/beehive

Development

Need help? Want to hack on your own Hives? Join us on IRC (irc://freenode.net/#beehive) or Gitter. Follow the bees on Twitter!

More Repositories

1

duf

Disk Usage/Free Utility - a better 'df' alternative
Go
10,935
star
2

cache2go

Concurrency-safe Go caching library with expiration capabilities and access counters
Go
2,009
star
3

smartcrop

smartcrop finds good image crops for arbitrary crop sizes
Go
1,808
star
4

termenv

Advanced ANSI style & color support for your terminal applications
Go
1,712
star
5

gitomatic

A tool to monitor git repositories and automatically pull & push changes
Go
1,014
star
6

gamut

Go package to generate and manage color palettes & schemes 🎨
Go
510
star
7

reflow

A collection of (ANSI-sequence aware) text reflow operations & algorithms
Go
450
star
8

gitty

Contextual information about your git projects, right on the command-line
Go
447
star
9

kmeans

k-means clustering algorithm implementation written in Go
Go
418
star
10

readme-scribe

A GitHub Action that automatically generates & updates markdown content (like your README.md)
396
star
11

crunchy

Finds common flaws in passwords. Like cracklib, but written in Go.
Go
378
star
12

obs-cli

OBS-cli is a command-line remote control for OBS
Go
306
star
13

regommend

Recommendation engine for Go
Go
303
star
14

markscribe

Your personal markdown scribe with template-engine and Git(Hub) & RSS powers 📜
Go
286
star
15

mango

mango is a man-page generator for the Go flag, pflag, cobra, coral, and kong packages
Go
229
star
16

docker-backup

A tool to create & restore complete, self-contained backups of Docker containers
Go
201
star
17

telephant

A lightweight but modern Mastodon client for the desktop
QML
193
star
18

go-app-paths

Lets you retrieve platform-specific paths (like directories for app-data, cache, config, and logs)
Go
175
star
19

deckmaster

An application to control your Elgato Stream Deck on Linux
Go
169
star
20

prism

An RTMP stream recaster / splitter
Go
150
star
21

asciicam

Displays your webcam... on the terminal
Go
124
star
22

gitflux

Track your GitHub projects in InfluxDB and create beautiful graphs with Grafana
Go
117
star
23

cancelreader

A cancelable reader for Go
Go
102
star
24

service-tools

A growing collection of convenient little tools to work with systemd services
Go
91
star
25

mastotool

A collection of command-line tools to work with your Mastodon account
Go
89
star
26

thunder

BoltDB's Interactive Shell
Go
80
star
27

sticker

A Golang lib to generate placeholder images with text
Go
79
star
28

toktok

Typo/error resilient, human-readable token generator
Go
67
star
29

sasquatch

A simple data encryption library
Go
56
star
30

combinator

Generates a slice of all possible value combinations for any given struct and a set of its potential member values
Go
48
star
31

lighthouse

A fully modular, parametric, and customizable case design. Built with OpenSCAD.
OpenSCAD
43
star
32

roff

roff lets you write roff documents in Go
Go
42
star
33

pam-beacon

PAM module for multi-factor authentication with Bluetooth Devices & Beacons
Go
41
star
34

streamdeck

An application and Go library to control your Elgato Stream Deck on Linux
Go
41
star
35

marky

Generate markdown programmatically
Go
40
star
36

sync3c

A little tool to sync/download media from https://media.ccc.de
Go
36
star
37

muesli

My secret muesli repo
33
star
38

huephp

PHP library to control the Philips Hue lighting system
PHP
33
star
39

obs-scene-switcher

Tracks your active window and switches OBS scenes accordingly
Go
32
star
40

mango-cobra

cobra adapter for mango
Go
31
star
41

scratchy

Quickly bootstrap a Linux distro in a (non-Docker) container and interactively execute something in it
Go
27
star
42

gitcha

Go helpers to work with git repositories
Go
25
star
43

ansi

Raw ANSI sequence helpers
Go
19
star
44

goprogressbar

Print progress bars on the console with Go
Go
19
star
45

ircflu

ircflu is an IRC bot written in Go
Go
19
star
46

go-razer

Go library to control Razer (Chroma) devices
Go
18
star
47

magicwand

MagicWand makes your input devices context sensitive
Go
17
star
48

gotable

Go helper to print a table of data to stdout
Go
15
star
49

goefa

A Go client for EFA APIs (Elektronische Fahrplan Auskunft)
Go
15
star
50

ydl

A simple youtube-dl library for Go
Go
15
star
51

xray

xray compares media files by their perceptual hash and identifies dupes
C++
15
star
52

clusters

Data structs and algorithms for clustering data observations and basic computations in n-dimensional spaces
Go
14
star
53

dotfiles

My dotfiles
Shell
14
star
54

saloon

Saloon, an Arduino/ESP-based Information Monitor
C++
13
star
55

cap-generator

OpenSCAD cap with thread generator
OpenSCAD
13
star
56

elvish-libs

Libs / Themes for elvish
13
star
57

ms-pacman

Handy scripts for Arch Linux users
Shell
12
star
58

silhouette

Silhouette cluster analysis implementation in Go
Go
11
star
59

penpal

A Linux daemon to sync Wacom Bamboo devices
Go
10
star
60

code-server

My code-server Docker image
Dockerfile
10
star
61

beehive-admin

Admin interface to Beehive - https://github.com/muesli/beehive
JavaScript
9
star
62

smolder

smolder makes it easy to write restful Golang JSON APIs
Go
9
star
63

mango-coral

coral adapter for mango
Go
8
star
64

deckmaster-emojis

A deck of emojis for Deckmaster
8
star
65

configaro

The Marriage of (Con)Figaro - A small but flexible config system that's XDG-compliant
6
star
66

smartcrop-samples

Sample images to test the smartcrop algorithm with
6
star
67

gominatim

Go library to access nominatim geocoding services
Go
5
star
68

go-pkg-rss

go-pkg-rss
Go
5
star
69

go-crashcourse

A Crash-Course in Learning Go
Go
5
star
70

homebrew-tap

muesli's Homebrew tap
Ruby
4
star
71

bones

A Golang Code Doctor
Go
4
star
72

mango-pflag

pflag adapter for mango
Go
3
star
73

polly

Polly wants a cracker
Go
3
star
74

maker-coin

A simple Maker Coin designed in OpenSCAD
Python
3
star
75

quaint

Image & static content HTTP server written in Go
Go
3
star
76

videowall

An interactive wall of live videos
C++
2
star
77

filament-swatch

Parameterized Filament Swatch / Sample Tag in OpenSCAD
OpenSCAD
2
star
78

flipdots

Go library to access OpenLab's flipdot matrix
Go
2
star
79

pkgbuilds

My collection of Arch Linux PKGBUILDs
Shell
2
star
80

beehive-vendor

Vendor files for Beehive
Go
2
star
81

QtGaugeWidget

Gauge widget for Qt
C++
1
star
82

go-pkg-xmlx

go-pkg-xmlx
Go
1
star
83

jigo

A set of #golang jigs
1
star
84

nibbler

Network logging daemon written in Go
Go
1
star
85

comunit

PASCAL interface to access serial COM ports
Pascal
1
star
86

tomahawk-iOS

Tomahawk iOS Player
Objective-C
1
star