| Crates.io | chant |
| lib.rs | chant |
| version | 0.1.1 |
| created_at | 2025-12-14 21:58:00.004381+00 |
| updated_at | 2025-12-14 21:58:00.004381+00 |
| description | Shell glamour - beautiful prompts and output for scripts 🪄 |
| homepage | https://molten.dev |
| repository | https://github.com/moltenlabs/chant |
| max_upload_size | |
| id | 1985167 |
| size | 72,583 |
Shell glamour - beautiful prompts and output for scripts.
To chant is to speak magical words. This crate lets you speak beautifully to your users through interactive prompts and styled output.
use chant::{input, confirm, choose, spin};
// Get user input
let name = input("What's your name?")
.placeholder("Enter name...")
.run();
// Confirm an action
if confirm("Continue?").default(true).run() {
// ...
}
// Choose from options
let choice = choose(&["Option A", "Option B", "Option C"])
.header("Pick one:")
.run();
// Show a spinner while working
spin("Loading...").run(|| {
std::thread::sleep_ms(2000);
});
# Install
cargo install chant
# Use in scripts
NAME=$(chant input --prompt "Name:")
chant confirm "Deploy?" && ./deploy.sh
CHOICE=$(chant choose "dev" "staging" "prod")
chant spin "Installing..." --duration 3
cargo add chant
Part of the Molten Labs open source ecosystem:
| Crate | Description |
|---|---|
| molten_brand | Design tokens & colors |
| glyphs | ANSI escape sequences |
| lacquer | Terminal styling |
| tuyere | TUI framework |
| scoria | TUI components |
| chant | Shell glamour (you are here) |
| aglow | Markdown renderer |
| censer | Pretty logging |
MIT OR Apache-2.0
Built with 🪄 by Molten Labs