Skip to content
@chamomile-rb

chamomile-rb

🌼 Chamomile

Build terminal apps in pure Ruby.

An event-driven TUI framework with declarative callbacks, a composable View DSL, terminal styling, reusable components, and zero runtime dependencies.

Website · API Docs · Get Started


What's Inside

🌼 Chamomile — The Complete Ruby TUI Framework

One gem. Everything you need for terminal UIs in Ruby.

gem install chamomile

Core Runtime

  • View DSLpanel, text, list, table, status_bar
  • Declarative callbackson_key, on_mouse, on_tick
  • Thread pool commands — async by default
  • FPS-throttled diff renderer — only redraws what changed
  • Mouse, paste, focus, resize events

Styling — CSS-like box model with true color, 10 border presets, padding, margin, alignment, horizontal/vertical layout composition

Components — 13 reusable TUI components: TextInput, TextArea, Viewport, Table, List, FilePicker, Spinner, Progress, Timer, Stopwatch, Paginator, Cursor, Help

🚂 Lazyrails — Flagship App

A lazygit-style TUI for Rails developers. Routes, migrations, models, tests, server, gems — all in one split-pane interface.

gem install lazyrails-tui
  • 13+ navigable panels — status, routes, models, DB, tests…
  • Live server log streaming with auto-detection
  • Command log with undo — reverse generators & migrations
  • Smart introspection via Rails APIs, not text parsing

Get Started

require "chamomile"

class Counter
  include Chamomile::Application

  def initialize
    @count = 0
  end

  on_key(:up, "k")   { @count += 1 }
  on_key(:down, "j") { @count -= 1 }
  on_key("r")        { @count = 0 }
  on_key("q")        { quit }

  def view
    panel(title: "Counter", border: :rounded, color: "#7d56f4") do
      text "Count: #{@count}", bold: true, color: "#7d56f4"
      text ""
      status_bar "↑/k increment · ↓/j decrement · r reset · q quit"
    end
  end
end

Chamomile.run(Counter.new)

How It Works

Application → Your class is the app · Events → Declare callbacks with on_key, on_mouse, on_tick · View DSL → Build layouts with panel, text, list, table

Everything is a command. Async by default, composable by design.


ko-fi

MIT License

Popular repositories Loading

  1. chamomile chamomile Public

    A TUI framework inspired by Charm's Bubbletea

    Ruby

  2. petals petals Public archive

    A TUI component library to complement Chamomile

    Ruby

  3. flourish flourish Public archive

    Styles for your terminal inspired by Charm's Lipgloss

    Ruby

  4. lazyrails lazyrails Public

    A Rails TUI

    Ruby

  5. chamomile-rb.github.io chamomile-rb.github.io Public

    Pages for Chamomile

    HTML

  6. .github .github Public

    Chamomile

Repositories

Showing 6 of 6 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…