What is Rune?
Rune is the Rust equivalent of gum from Charmbracelet. It provides beautiful interactive prompts and styled output for shell scripts and CLI applications.
Features
📝 Input
Get text input with style.
use input;
let name = input
.placeholder
.default
.run;
println!;
✅ Confirm
Yes/no confirmations.
use confirm;
if confirm
.default
.run
📋 Choose
Select from a list.
use choose;
let choice = choose
.header
.run;
if let Some = choice
🔍 Filter
Fuzzy search through options.
use filter;
let result = filter
.header
.limit
.run;
🔄 Spin
Show spinners while working.
use spin;
spin
.run;
// ✓ Loading data...
🎨 Style
Style arbitrary text.
use style_text;
use Border;
style_text
.foreground_hex
.bold
.padding
.border
.print;
Installation
As a library
As a CLI tool
CLI Usage
Rune also works as a standalone CLI tool for shell scripts:
Input
NAME=
Confirm
if ; then
fi
Choose
CHOICE=
Filter
FILE=
Spin
Style
Shell Script Example
#!/bin/bash
# Welcome message
# Get project name
PROJECT=
# Choose template
TEMPLATE=
# Confirm
if ; then
else
fi
API Reference
Input
input
.placeholder // Placeholder text
.default // Default value
.password // Hide input
.char_limit // Max characters
.header // Header text
.run
Confirm
confirm
.default // Default answer
.affirmative // Yes text
.negative // No text
.run
Choose
choose
.header // Header text
.cursor // Selection cursor
.limit // Visible items
.run
Filter
filter
.header // Header text
.placeholder // Input placeholder
.limit // Visible items
.run
Spin
spin
.style // Spinner style
.color // Spinner color
.run
Ecosystem
Rune is part of the Molten Labs open source ecosystem:
| Crate | Description |
|---|---|
| molten_brand | Design tokens & colors |
| glyphs | ANSI escape sequences |
| lacquer | Terminal styling |
| cauldron | TUI framework |
| sparks | TUI components |
| rune | Shell glamour (you are here) |
| ember | Markdown renderer |
| smelt | Pretty logging |
Why "Rune"?
Runes are ancient symbols of magic and power. With Rune, you inscribe beautiful, interactive spells into your shell scripts. 🪄
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.