I am happy to announce rooibos v0.6.0.
Rooibos is a framework for building terminal applications in Ruby. It handles
keyboard input, mouse events, and async work so that you can focus on behavior
and testing.
Rooibos uses Model-View-Update, the architecture behind Elm, Redux, and Bubble
Tea. State lives in one place. Updates flow in one direction. The runtime
handles rendering and runs background work for you.
Get started in seconds:
gem install rooibos
rooibos new my_app
cd my_app
rooibos run
You have a working app with keyboard navigation, mouse support, and clickable
buttons. Open `lib/my_app.rb` to make it your own.
Features:
* **Message-driven.** Events and command results become messages. Update handles
them uniformly.
* **Immutable models.** State changes produce new models. The test helper
validates this for thread safety.
* **Async commands.** HTTP, shell, timers, file open, and batch. All run off
the main thread.
* **Custom commands.** Write your own with `Command.custom`. `out.put` outputs
results. `out.source` outsources work. `out.standing` stands up streams that
remain outstanding until you outwait them.
* **Fragments.** Compose large apps from smaller pieces. Each fragment has its
own Model, View, Update, and Init.
* **Router DSL.** Declarative keymaps and child fragment routing.
* **CLI scaffolding.** `rooibos new` generates a gem with a working app and
test infrastructure ready to go.
* **Testable.** Unit test Update/View/Init without a terminal. Plus the event
injection, test terminals, and snapshot testing you know from RatatuiRuby.
See README.rdoc for more:
https://git.sr.ht/~kerrick/rooibos/tree/stable/item/README.rdoc
Full changelog:
https://git.sr.ht/~kerrick/rooibos/tree/v0.6.0/item/CHANGELOG.md
Installation:
gem install rooibos
Gem: https://rubygems.org/gems/rooibos
Source: https://git.sr.ht/~kerrick/rooibos
Website: https://www.rooibos.run (forthcoming)