mdaguete / gopherbot

A chatops-oriented chatbot written in Go, inspired by Hubot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gopherbot

A.K.A. SUDO for the Enterprise

Gopherbot is:

  • A chat bot designed for ChatOps originally inspired by Hubot
  • A simple remote script execution agent accessible via Slack(*)
  • An easy means of delegating complex functionality to a user base without writing yet another web application

(*) with a modular interface for writing other protocol connectors in Go

The goal is for Gopherbot to support enough scripting languages and security features to make chat bots useful for doing real work. Examples of work Gopherbot is already doing:

  • Building, backing up, restoring, stopping and starting instances in the AWS cloud
  • Disabling / reenabling user web directories when requested by security engineers
  • Adding users and updating passwords on servers using Ansible

See Design Philosophy

Features

  • Multi-platform with builds for Linux, Windows and Mac
  • Multi-lingual with support for command plugins in Ruby, Python, PowerShell and Bash:
    • Most plugins can be distributed as a single text file
    • Plugins use blocking APIs vs registering callback functions, for easy scripting with a low learning curve
    • Plugin API includes WaitForReply* methods for simple question & answer flows
    • Flexible configuration can be easily overridden by the 'bot administrator
    • Configuration can limit plugins to certain channels and/or users
    • Sample plugins: Ruby, Python, Bash, PowerShell
  • Configurable elevated privilege support for security-sensitive commands
  • Localhost http/json interface for creating plugin APIs for other languages
  • A thread-safe brain for storing state
  • Configurable logging
  • A supply of plugins and commands for viewing the log, reloading configuration, and more
  • Many sample plugins, including knock-knock jokes!

Development Status

Gopherbot is running in production in my environment. Currently lacking:

  • Comprehensive plugin documentation
  • Connectors for protocols other than Slack
  • Brain implementations other than simple local files (e.g. redis)

Documentation

About

A chatops-oriented chatbot written in Go, inspired by Hubot

License:MIT License


Languages

Language:Go 89.3%Language:PowerShell 3.6%Language:Shell 2.7%Language:Ruby 2.2%Language:Python 2.2%