✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more
Andrii Bidochko
  • Updated: December 30, 2025
  • 8 min read

Charm Ruby Ecosystem: Build Stunning Terminal UIs with Ruby Gems

Charm Ruby illustration

Charm Ruby is a modern Ruby ecosystem that provides a suite of gems for building glamorous, highly‑styled terminal user interfaces (TUIs) with minimal code.

Charm Ruby ecosystem overview
The Charm Ruby ecosystem – a collection of Ruby gems that turn ordinary command‑line tools into polished, interactive experiences.

Introducing the Charm Ruby Ecosystem

Ruby developers have long enjoyed the elegance of the language for web and backend services, but building rich terminal interfaces often required piecing together low‑level libraries. Charm Ruby changes that narrative by offering a cohesive set of gems—each focused on a specific UI concern—while preserving Ruby’s expressive syntax.

Whether you are crafting a quick CLI utility, a data‑driven dashboard, or a full‑featured interactive console app, the Charm Ruby stack gives you the building blocks to style, animate, and interact with your terminal output without leaving the Ruby ecosystem.

For teams already leveraging AI‑driven platforms, the UBOS platform overview demonstrates how you can integrate these TUIs with AI services, creating end‑to‑end solutions that span from backend logic to user‑facing terminals.

Core Gems in the Charm Ruby Collection

The ecosystem revolves around a handful of purpose‑built gems. Each gem follows the Elm‑style architecture pioneered by the original Go libraries, ensuring predictable state management and composable UI components.

bubbletea

A powerful TUI framework that implements the Elm architecture in Ruby. It handles keyboard, mouse, and window events, letting you focus on business logic.

  • Command‑based side‑effects
  • Built‑in support for async updates
  • Composable models for complex apps

lipgloss

The styling toolkit that lets you define borders, padding, margins, colors (hex, ANSI, adaptive), tables, lists, and layout utilities—all with a fluent Ruby DSL.

  • Theme‑aware color handling
  • Responsive layout helpers
  • Easy chaining of style attributes

bubbles

A component library that ships ready‑made UI elements such as spinners, progress bars, timers, text inputs, viewports, tables, and file pickers.

  • Plug‑and‑play widgets
  • Fully compatible with bubbletea models
  • Customizable via lipgloss styles

bubblezone

Enables clickable regions inside your terminal UI. Define zones with IDs, track mouse coordinates, and react to click events.

  • Mouse‑aware UI components
  • Zone‑based event routing
  • Perfect for interactive dashboards

glamour

A stylesheet‑driven markdown renderer that brings rich, themed markdown directly to the terminal, complete with emoji support.

  • Dark, light, and dracula themes
  • Custom DSL for style overrides
  • Ideal for help screens and docs

ntcharts

Terminal charting library for visualizing data. Includes sparkline, bar, line, wave, real‑time streaming, and time‑series charts.

  • Live data feeds
  • Configurable axes and colors
  • Compact rendering for CI logs

huh

A simple yet powerful forms library. Supports input, select, multiselect, confirm, notes, spinners, and built‑in validation.

  • Block‑based DSL for form definition
  • Themes for consistent look‑and‑feel
  • Ideal for onboarding wizards

gum

A Ruby wrapper around the Gum binary, providing idiomatic methods for prompts, selections, spinners, and styled output.

  • Zero‑dependency shell scripts
  • Consistent UI across Ruby and Bash
  • Great for quick prototypes

harmonica

A physics‑based animation library that offers spring‑damped oscillators, projectile motion, and vector math for smooth terminal animations.

  • Frame‑rate helpers
  • Natural motion curves
  • Perfect for loading indicators

Getting Started: Installation & Package Management

All Charm Ruby gems are published on RubyGems and can be added to your project via Bundler. Choose only the gems you need to keep your bundle lightweight.

# Gemfile
gem "bubbletea"
gem "lipgloss"
gem "bubbles"
gem "glamour"
gem "ntcharts"
gem "huh"
gem "gum"
gem "harmonica"
gem "bubblezone"

After updating your Gemfile, run:

bundle install

If you prefer a single‑command setup, UBOS offers a Workflow automation studio that can scaffold a new Ruby TUI project with all required gems pre‑installed.

For teams evaluating cost, the UBOS pricing plans include a free tier that covers open‑source gem usage, making it easy to experiment without upfront investment.

Hands‑On: Sample Code and Real‑World Scenarios

1️⃣ A Minimal “Hello World” with Bubbletea & Lipgloss

require "bubbletea"
require "lipgloss"

class HelloWorld
  include Bubbletea::Model

  def initialize
    @style = Lipgloss::Style.new
               .border(:rounded)
               .border_foreground("#7D56F4")
               .padding(1, 2)
  end

  def init = [self, nil]

  def update(message)
    case message
    when Bubbletea::KeyMessage
      return [self, Bubbletea.quit] if message.to_s == "q"
    end
    [self, nil]
  end

  def view
    @style.render("Hello, Charm Ruby!\n\nPress q to quit")
  end
end

Bubbletea.run(HelloWorld.new)

This snippet demonstrates the core loop: init → update → view. The lipgloss style adds a rounded border and a custom color, turning a plain string into a polished UI element.

2️⃣ Interactive Counter with Real‑Time Updates

require "bubbletea"
require "lipgloss"

class Counter
  include Bubbletea::Model

  def initialize
    @count = 0
    @style = Lipgloss::Style.new.bold(true).foreground("#FF6B6B")
  end

  def update(message)
    case message
    when Bubbletea::KeyMessage
      case message.to_s
      when "q", "ctrl+c"
        return [self, Bubbletea.quit]
      when "up"
        @count += 1
      when "down"
        @count -= 1
      end
    end
    [self, nil]
  end

  def view
    @style.render("Count: #{@count}\\n\\nPress q to quit")
  end
end

Bubbletea.run(Counter.new)

Use this pattern for dashboards that need live counters, such as job queue lengths or API request rates.

3️⃣ Markdown Help Screen with Glamour

require "glamour"

markdown = <<~MD
  # Welcome to My CLI Tool
  **Bold** text, *italic* text, and `code` snippets.
  - Feature A
  - Feature B
  - Feature C
  :rocket: Enjoy!
MD

puts Glamour.render(markdown, style: "dark", width: 80, emoji: true)

Embedding rich documentation directly in the terminal improves user onboarding. Pair this with UBOS templates for quick start to ship pre‑styled help pages with a single line of code.

4️⃣ Real‑Time Data Visualization with NTCharts

require "ntcharts"

chart = Ntcharts::Streamlinechart.new(60, 12) # width, height

loop do
  chart.push(Math.sin(Time.now.to_f) * 4 + 5)
  print "\e[H\e[2J" # clear screen
  puts chart.render
  sleep 0.1
end

Ideal for monitoring CPU usage, stock tickers, or any streaming metric. The chart updates in place, keeping the terminal clean and readable.

5️⃣ Form‑Based Input with Huh

require "huh"

form = Huh.form(
  Huh.group(
    Huh.input.key("name").title("Your name?").placeholder("John Doe"),
    Huh.select.key("language")
        .title("Preferred language?")
        .options(*Huh.options("Ruby", "Python", "Go"))
  )
).with_theme(Huh::Themes.charm)

result = form.run
puts "Hello, #{result["name"]}! You love #{result["language"]}."

Combine this with AI marketing agents to collect user preferences and feed them directly into personalized campaign generators.

Why Choose Charm Ruby for Terminal UI Development?

  • Ruby‑First Experience: No need to learn a new language or bridge between Go and Ruby; all gems are idiomatic Ruby.
  • Composable Architecture: The Elm‑style model encourages clear separation of state, view, and side‑effects, reducing bugs.
  • Rich Styling: lipgloss provides CSS‑like styling capabilities directly in the terminal.
  • Ready‑Made Components: bubbles and huh accelerate development by offering pre‑built widgets.
  • Real‑Time Interaction: Mouse support via bubblezone and live charts with ntcharts enable data‑intensive dashboards.
  • Seamless AI Integration: Pair with UBOS’s Enterprise AI platform by UBOS to embed LLM‑driven assistants inside your CLI.
  • Open‑Source & MIT Licensed: Free for commercial and personal use, with an active community contributing extensions.

Charm Ruby vs. Other Terminal UI Toolkits

Feature Charm Ruby Curses (Ruby‑ncurses) TTY‑Prompt
Modern Architecture Elm‑style, immutable state Procedural, mutable Prompt‑centric only
Styling Flexibility Lipgloss CSS‑like DSL Limited color support Basic color tags
Component Library Bubbles, Huh, NTCharts, etc. Low‑level primitives Only prompts
Mouse Support Bubblezone Rarely used None
AI‑Ready Integration Works with UBOS AI services Manual HTTP calls Manual integration required

If your project demands a full‑featured, aesthetically pleasing terminal UI, Charm Ruby clearly outpaces traditional curses‑based approaches while offering a richer ecosystem than lightweight prompt libraries.

Real‑World Use Cases for Charm Ruby

  1. DevOps Dashboards: Combine ntcharts with live log streams to monitor CI pipelines directly from the terminal.
  2. AI‑Powered Chatbots: Use AI Chatbot template together with bubbletea to create a conversational CLI that queries LLMs via UBOS’s OpenAI ChatGPT integration.
  3. Interactive Documentation: Render markdown help pages with glamour, providing developers with searchable, styled docs without leaving the terminal.
  4. Customer Support Tools: Build a ticket‑viewer using bubbles and gum that integrates with the Telegram integration on UBOS for real‑time alerts.
  5. Data Science Prototypes: Rapidly prototype data visualizations with ntcharts and export results to the UBOS templates for quick start for reporting.

Start Building Glamorous TUIs Today

Ready to bring your command‑line tools to life? Explore the full UBOS portfolio examples for inspiration, then spin up a new project with the Web app editor on UBOS. If you’re a startup, the UBOS for startups program offers dedicated support and credits.

Join the UBOS partner program to get early access to new gems, co‑marketing opportunities, and priority support.

“The Charm Ruby ecosystem transformed our internal tooling from static scripts into interactive, brand‑consistent experiences—all within a single Ruby codebase.”

Dive in now and let your terminal shine. For the latest updates, keep an eye on the UBOS blog where we regularly showcase new TUI patterns and community contributions.

Boost Your TUI with UBOS Template Marketplace

UBOS’s marketplace offers ready‑made AI‑enhanced templates that pair perfectly with Charm Ruby components:

© 2025 UBOS Technologies. All rights reserved.


Andrii Bidochko

CTO UBOS

Andrii Bidochko is an AI entrepreneur and researcher focused on AI agents, reinforcement learning, and autonomous systems. He writes about the technologies shaping the future of machine intelligence, from frontier models and agent architectures to real-world AI applications.

Sign up for our newsletter

Stay up to date with the roadmap progress, announcements and exclusive discounts feel free to sign up with your email.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.