A Ruby gem providing a collection of common tools (call-back functions) for use with the following gems:
- ruby_llm: multi-provider
gem install ruby_llm
- llm: multi-provider
gem install llm.rb
- omniai: multi-provider
gem install omniai-tools
(Not part of the SharedTools namespace) - more to come ...
Installation
Add this line to your application's Gemfile:
gem 'shared_tools'
And then execute:
bundle install
Or install it yourself as:
gem install shared_tools
Usage
Basic Loading
require 'shared_tools'
Loading RubyLLM Tools
RubyLLM tools are loaded conditionally when needed:
require 'shared_tools'
# Load all RubyLLM tools (requires ruby_llm gem to be available and loaded first)
require 'shared_tools/ruby_llm'
# Or load a specific tool directly
require 'shared_tools/ruby_llm/edit_file'
require 'shared_tools/ruby_llm/read_file'
require 'shared_tools/ruby_llm/python_eval'
# etc.
Rails and Autoloader Compatibility
This gem uses Zeitwerk for autoloading, making it fully compatible with Rails and other Ruby applications that use modern autoloaders. RubyLLM tools are excluded from autoloading and loaded manually to avoid namespace conflicts.
Special Thanks
A special shout-out to Kevin's omniai-tools gem, which is a curated collection of tools for use with his OmniAI gem.