chant

Crates.iochant
lib.rschant
version0.1.1
created_at2025-12-14 21:58:00.004381+00
updated_at2025-12-14 21:58:00.004381+00
descriptionShell glamour - beautiful prompts and output for scripts 🪄
homepagehttps://molten.dev
repositoryhttps://github.com/moltenlabs/chant
max_upload_size
id1985167
size72,583
Chris Mathew (chriscmathew-dorsia)

documentation

https://docs.rs/chant

README

🪄 Chant

Shell glamour - beautiful prompts and output for scripts.

Crates.io Documentation License


What is Chant?

To chant is to speak magical words. This crate lets you speak beautifully to your users through interactive prompts and styled output.


Features

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);
});

CLI Usage

# 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

Installation

cargo add chant

Ecosystem

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

License

MIT OR Apache-2.0

Built with 🪄 by Molten Labs

Commit count: 0

cargo fmt