- Unified message API —
shui message <type> <text>covers success, error, warning, info, and muted in one consistent command - Token-based theme engine — swap colours, icons, and styles via environment variables without touching component code; ships with
default,minimal, andplainthemes - Inline components —
badgeandpillwrite to stdout without a newline, composing naturally inside$(...)expressions - Interactive prompts —
confirm,select,radio,multiselect, andinputwith keyboard navigation and sensible defaults - Progress & spinners —
progress,spinner, andloaderwith optional native iTerm2 dock-badge integration - Zero dependencies — a single
source shui.zshis all you need; no npm, no brew, no external tools - NO_COLOR aware — respects the NO_COLOR convention and degrades gracefully to plain ASCII
Clone into a convenient location and source the entry point:
git clone https://github.com/kud/shui ~/.shuiThen add to your .zshrc:
source ~/.shui/shui.zshOr source it inline at the top of any script:
#!/usr/bin/env zsh
source "${0:A:h}/lib/shui/shui.zsh"shui <TAB> completes subcommands (with descriptions) and their values —
types, theme subcommands, input --validate rules, and more. Sourcing
shui.zsh in an interactive shell registers it automatically. For the
canonical setup, add the completions directory to $fpath before compinit:
fpath+=(~/.shui/completions)
autoload -Uz compinit && compinit$ shui message success "Deployment complete"
âś… Deployment complete
$ shui message error "Build failed"
❌ Build failed
$ shui message warning "Config file missing, using defaults"
⚠️ Config file missing, using defaults
$ shui message info "Fetching dependencies…"
ℹ️ Fetching dependencies…
$ label=$(shui badge "v0.4.4")
$ shui message success "Released ${label}"
âś… Released [v0.4.4]
$ shui confirm "Deploy to production?"
? Deploy to production? [y/N]Switch icon sets with SHUI_ICONS:
SHUI_ICONS=emoji # default — requires Nerd Font
SHUI_ICONS=unicode # plain Unicode fallback
SHUI_ICONS=none # no icons at allgit clone https://github.com/kud/shui.git
cd shuiTasks are managed with mise:
mise run test # run all test suites
mise run lint # syntax-check all Zsh source files
mise run demo # run the visual component demo📚 Full documentation → shui/docs