Expand description
§Rune
Shell glamour - beautiful prompts and styled output for shell scripts.
Rune is the Rust equivalent of gum from Charmbracelet. It provides easy-to-use functions for interactive shell scripts and beautiful terminal output.
§Features
- Input - Get user input with style
- Confirm - Yes/no confirmations
- Choose - Select from a list
- Filter - Fuzzy search through options
- Spin - Show loading spinners
- Style - Style arbitrary text
§Quick Start
use rune::{input, confirm, choose, spin};
// Get user input
let name = input("What's your name?").run();
// Confirm an action
if confirm("Continue?").run() {
// ...
}
// Choose from options
let choice = choose(&["Option A", "Option B", "Option C"]).run();
// Show a spinner while working
spin("Loading...").run(|| {
// do work...
});Modules§
- prelude
- Prelude for convenient imports.
Structs§
- Choose
- Selection prompt builder.
- Confirm
- Confirmation prompt builder.
- Filter
- Filter prompt builder.
- Input
- Text input builder.
- Spin
- Spinner builder.
- Style
Cmd - Style command builder.