Nightingale is a Ruby framework for building interactive data and AI web applications with a simple, declarative DSL. It brings the "script-as-app" experience (like Streamlit) to the Ruby ecosystem.
- Ruby DSL: Write your UI in pure Ruby.
- Reactive: Automatically updates the UI when you save your script.
- Interactive: Built-in widgets like sliders, buttons, and dataframes.
- Modern Frontend: React + Vite powered UI for a smooth experience.
gem install nightingale
# Or add to your Gemfile
gem 'nightingale'-
Create a new app:
nightingale new myapp cd myapp -
Run the app:
nightingale run app.rb
-
Edit
app.rband watch the magic happen!
Displays a large title.
Renders Markdown content.
Renders a button. Returns true if clicked.
if button "Click me"
markdown "Clicked!"
endRenders a slider. Returns the current value.
val = slider "Select value", min: 0, max: 100
markdown "Value: #{val}"Displays a table of data (array of hashes).
data = [{ name: "Alice", age: 30 }, { name: "Bob", age: 25 }]
dataframe dataA hash-like object to store state across reruns.
session_state[:count] ||= 0
session_state[:count] += 1 if button "Increment"See ARCHITECTURE.md for details on how Nightingale works.
To set up the project for development (including installing Ruby gems and frontend dependencies):
bin/setupTo run the demo app during development:
bin/nightingale run examples/demo/app.rbMIT
