librex

librex is a repackaging of the Metasploit Rex framework as a ruby gem for non Metasploit applications to consume it

You can access the github repo at https://github.com/hammackj/rex

You can also just install librex with sudo gem install librex, documentation on how to use it can be found here.