Project

riffer-rig

0.0
The project is in a healthy, maintained state
An interactive terminal agent (read/write/edit/bash) built on the riffer agentic framework.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 0.14.0
~> 0.3
~> 2.8
~> 2.14
~> 1.6
~> 0.55.0
 Project Readme

riffer-rig

riffer, in your terminal and in your process.

riffer-rig is a general-purpose agent for Ruby developers who want to own their harness. It runs in your terminal, and because the runtime is separate from the terminal it also runs inside any Ruby process: a Rails app, a script, a job. You extend it in Ruby — tools, commands, providers and hooks are ordinary classes on riffer's primitives, and the same objects work in the terminal and in your app.

It ships with a coding toolkit (read, write, edit, bash) because a shell and file access get almost any task done, but nothing in its prompt makes it a coding agent. Tools run without asking for permission; see what runs without asking.

Install

Requires Ruby 3.3 or later.

gem install riffer-rig

Quickstart

cd my-project
riffer

The first run asks for a model as provider/name — for example anthropic/claude-sonnet-4-6 — and then for that provider's API key, and saves both under ~/.riffer/. gemini/… models work straight away; other providers' SDK gems are offered for install on first use.

Type a prompt and press Enter. /help lists the commands, and Getting started walks through a first session.

Extend it

An extension is a Ruby block in ~/.riffer/rig.rb (every project) or .riffer/rig.rb (one project):

Riffer::Rig.extension('git') do |rig|
  rig.command('log', description: 'Recent commits') { |ctx| ctx.say `git log --oneline -n 10` }
  rig.prompt(:branch) { "Current branch: #{`git branch --show-current`}" }
end

That adds a /log command and puts the current branch in the system prompt on every turn. Extensions can also add tools, hooks, skills, MCP servers, settings and providers — Extensions starts with a complete tool.

Embed it

runtime = Riffer::Rig::Loader.runtime(cwd: Dir.pwd, host: Riffer::Rig::Hosts::Null.new)
puts runtime.ask('why is this test failing?').content

This builds the same agent the terminal does, from the same settings, credentials and extensions. Embedding covers streaming, cancelling, snapshots and reloading.

Documentation

The guides are at https://riffer.bottrall.dev, and their sources are in docs/. Good places to start:

  • Overview — what riffer-rig is and how it fits together
  • Configuration — settings and where each value comes from
  • Command line — every flag
  • Headless mode — one prompt from a script or CI job, with exit codes and an NDJSON stream
  • ACP — riffer-rig in your editor, with riffer acp
  • Extensions — your own tools, commands and hooks

Contributing

CONTRIBUTING.md covers setup, the scripts and pull requests, and AGENTS.md has the project's conventions. Please follow the Code of Conduct.

License

MIT — see LICENSE. Maintained by Jake Bottrall.