Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

flammarion

> 编程语言
Open source

The nifty ruby gui toolkit.

284 stars0 likes1 views
WebsiteGitHub

About

The nifty ruby gui toolkit.

Flammarion GUI Toolkit

  • Source
  • Documentation

Overview

Flammarion is an easy-to-use library for displaying information that you might normally display to the command line in a slightly easier-to-access way.

It is not intended to be a full fledged application development toolkit. It is intended instead for small scripts where you just want to show some information or buttons without going through too much trouble.

Installation

First, you need to install electron or chrome and make sure it's in your path. (Note: On Windows, currently only chrome works, but you don't need to worry about putting it in your path.)

Then you can install the gem:

gem install flammarion

or add it to your Gemfile.

Tutorial

The easiest way to use Flammarion, is similar to how you might use STDOUT:

(Note: these examples are intended to be run from an interactive session such as IRB or pry. If you wish to use them as part of a script, you should use f.wait_until_closed at the end, in order to block termination of the script.)

ruby
require 'flammarion'
f = Flammarion::Engraving.new
f.puts "Hello World!"

It can even support standard console color codes (Thanks to ansi_up!) and emoji / icons (Thanks to tweomji and font awesome)

ruby
require 'colorized'
f.puts "This line will be red!".red
f.puts "This #{"word".colorize(:green)} will not be blue."
f.puts "This line will have cows :cow: :cow2:", escape_icons: true

However, you can also do more advanced things. Say you want to show a table. Easy!

ruby
f.table(
  [%w[Number Squared Sqrt].map{|h| h.light_magenta}] + # Make the header a different color
  10.times.collect{|x| [x, x * x, Math.sqrt(x)]})

Now, instead of a table, you decide you want a plot. No problem.

ruby
x = 10.times.to_a
f.plot([{x:x, y:x}, {x: x, y: x.map{|i| i*i}}, {x: x, y: x.map{|i| Math.sqrt(i)}}])

Or maybe you want to know where something is:

ruby
f.map("Boston, MA")

Maybe you even want to see both of those things at the same time!

ruby
f.pane("numberstuff").table([%w[Number Squared Sqrt].map{|h| h.light_magenta}] +
  10.times.collect{|x| [x, x * x, Math.sqrt(x)]})
f.pane("mapstuff").map("Big Ben")

If you need feedback, there's a simple callback mechanism for buttons and text boxes:

ruby
f.button("Click Here!!!") {f.puts "You clicked the button!"}
f.input("Placeholder > ") {|msg| f.puts "You wrote: #{msg['text'].light_magenta}"}

The api documentation is available at .

Screenshots / Samples

Message Composer with Address Book

ruby
f = Flammarion::Engraving.new
f.orientation = :horizontal
recipient = f.subpane("number").input("Phone Number")
text = f.input("Body", multiline:true)
f.button("Send") { send_message(recipient.to_s, text.to_s); f.status("Message Sent!")}
f.pane("contacts").puts("Contacts", replace:true)
icons = %w[thumbs-up meh-o bicycle gears star-o star cow cat cactus] + [nil] * 5
30.times do |i|
  name = Faker::Name.name
  f.pane("contacts").button(name, right_icon:icons.sample, left_icon:icons.sample) do
    recipient = name
    f.subpane("number").replace(name)
  end
end

Rake Task Runner

…

Tables

ruby
f = Flammarion::Engraving.new
f.orientation = :horizontal
f.table([["Id", "Name", "Address"].map{|h| h.light_magenta}] + 20.times.map do |i|
  [i, Faker::Name.name, Faker::Address.street_address]
end)
f.pane("sidebar").pane("side1").puts Faker::Hipster.paragraph.red
f.pane("sidebar").pane("side2").puts Faker::Hipster.paragraph.green

3.times { f.status(Faker::Hipster.sentence.light_green)}
ruby
f = Flammarion::Engraving.new
f.plot(5.times.map{|t| {y:100.times.map{rand * t}}})

Examples

There are a number of useful examples in the examples directory.

Some of these examples can be quite handy in their own right. If you wish to install these as executables, you can install the flammarion-utils gem with the command

bash
gem install flammarion-utils

Bundled Packages

Flammarion is distributed with a bunch of useful tools to make everyone's life easier. They are:

  • ansi up
  • highlight.js
  • jquery
  • jquery transit
  • leaflet
  • font awesome
  • twemoji
  • emojione v2
  • Plotly

Issues· 14 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言