BeeLine, a BeeChat Client Framework for Ruby

in HiveDevs8 months ago (edited)


BeeLine is a BeeChat Client Framework for Ruby. BeeChat has been designed by @reazuliqbal. BeeLine provides abstraction to for ruby developers to interact through the BeeChat API.


Add to your Gemspec

gem 'beeline-rb', require 'beeline'
bundle install


In your project ...

gem install beeline-rb
require 'beeline'


From the root of your project, add a file called config.yml containing (using your own account information):

# Example config.yml

  :hive_account: social
  :hive_public_key: STM5ctejUsoZ9FwfCaVbNvWYYgNMBo9TVsHSE8wHrqAmNJi6sDctt
  :hive_posting_wif: 5JrvPrQeBBvCRdjv29iDvkwn3EQYZ9jqfAHzrCyUvfbEbRkrYFC

In your project, access the session:

require 'beeline'

bot = '$')

# Just match on a message.
bot.message('Ping!') do

# Match on a pattern.
bot.message(/\d+/) do
  'Yes, those are numbers.'

# Respond to `$time` with current time.
bot.command(:time) do

# Respond to `$say` with reply.
bot.command(:say) do |args|
  if args.nil?
    'What do you want me to say?'
    "You wanted me to say: #{args}"

# Start the bot run loop.

See some of my previous Ruby How To posts in: #radiator #ruby

Get in touch!

If you're using Tender, I'd love to hear from you. Drop me a line and tell me what you think! I'm @inertia on Hive.


I don't believe in intellectual "property". If you do, consider BeeLine as licensed under a Creative Commons CC0 License.


Have you been using beechat and what are your thoughts? We are looking at trying it out in peakd perhaps

 8 months ago 

Looks pretty good. It's a simple alternative. I think they're planning to add an embedded version to simplify web integration. At least, that's the rumor.

This tool, beeline, is not that, however. It is for people who want to set up their own bot.

For example, if you log into and send a private message to @banjo, you will get an automated response (unless it has crashed).

The fact you work so hard on something as cool as this and stick to your beliefs about allowing it to be used as a CCL is commendable to say the least. Rum will dig this, wipes tear.... (insert name of your choice) is all grown up

 8 months ago 

Thanks. The main thing about the CCL is that I don't want to limit how my code is implemented in other projects, because it's just sand in the gears for wider adoption, especially on a platform that is sensitive to plagiarism.

Of course, this doesn't side-step plagiarism. That's a whole separate concern.

I have customers who don't go CCL and I'm happy to stick to their wishes on those projects. And besides, the goal isn't usually wider adoption with those. Or, if it is, they use a license like MIT, which protects their "property."

And at any point, if I want to assert my ownership, I could always revoke the license, supposedly.