Foobara is the Command-Centric and Discoverable Framework that Abstracts-Away Integration Code!

Write your domain logic as Foobara commands and automatically get a Ruby or TypeScript SDK with no additional work! Easily integrate those commands with CLI, HTTP, MCP, AI agents, async job queues/schedulers... whatever integration you can think of. And also automatically be forward compatible with integrations that haven't even been thought of yet!

Baby's First Command!

Baby capybara drinking from a bottle

CaplinRous at English Wikipedia, CC BY-SA 3.0, via Wikimedia Commons

View on GitHub →
class Greet < Foobara::Command
  inputs do
    who :string, default: "World"
  end
  result :string

  def execute
    "Hello, #{who}!"
  end
end

# using .run!
puts Greet.run!
puts Greet.run!(who: "Fumiko")

# using .run
outcome = Greet.run(who: "Barbara")
puts outcome.success? ? outcome.result : outcome.errors_hash

# using .new #run
command = Greet.new(who: "Basil")
outcome = command.run
puts outcome.success? ? outcome.result : outcome.errors_hash

Explore Connectors

This Script on GitHub ShCliConnector on GitHub
command_connector = Foobara::CommandConnectors::ShCliConnector.new

command_connector.connect(CreateCapybara)
command_connector.connect(IncrementAge)
command_connector.connect(FindCapybara)

command_connector.run

Code Generators!

$ gem install foob
Successfully installed foob-0.1.0
1 gem installed
$ foob g
Usage: foob generate [GENERATOR_KEY] [GENERATOR_OPTIONS]

Available Generators:

  command
  domain
  domain-mapper
  local-files-crud-driver
  mcp-connector
  organization
  rack-connector
  redis-crud-driver
  remote-imports
  resque-connector
  resque-scheduler-connector
  ruby-project
  sh-cli-connector
  type
  typescript-react-command-form
  typescript-react-project
  typescript-remote-commands
Diagram showing how Foobara combines command-centric approach with discoverability

Command-centric

  • Domain operations are encapsulated and composable
  • Commands serve as the public interface to your domains
+

Discoverability

  • Formal, machine-readable description of systems
  • Used to abstract away integration code
  • Enables tooling and automation
=

Foobara

  • Better communicates mental models
  • Avoids coupling domain logic to integration logic
  • Focuses on the domain problem, not integration

Why Foobara?

Domain Focus

Engineers spend more time writing code relevant to the domain and less time on tech-stack or architecture decisions.

Clearer Mental Models

Commands form each Domain's public interface and have domain-specific names and implementation, helping with communication and understanding mental models across teams/orgs/systems.

Flexible Architecture

Rearchitect systems without changing interfaces, reducing refactoring and testing requirements.

The Roster of Abstractions

Commands

The champion of Foobara! Encapsulate high-level domain operations and expose them in new ways without refactoring your precious domain logic.

Models & Entities

Define discoverable domain models and entities with persistence and transaction support.

Organizations & Domains

Organize commands, types, and errors into Domains and Organizations.

Remote Commands

Call commands in TypeScript or Ruby across system boundaries with the same interface as local Ruby commands.

Domain Mappers

Map concepts between domains to allow commands to focus on one domain.

Custom Types

Create custom data types that other tools and systems can discover.

Command Connectors

Integrate commands via CLI, HTTP, MCP, async job queues, and whatever else pops up without changing your domain logic or refactoring your code.

CRUD Drivers

Store entity records with a consistent interface across multiple data stores.

Code Generators

Generate various Foobara components, and even Ruby and TypeScript/React projects from foobara manifest metadata.

Watch an Intro Video!