👋 Introduction
A fluid terminal UI for Zsh — semantic components, a token-based theme engine, and one consistent API.
shui = Shell UI. 水 = water in Chinese — fluid, effortless, takes the shape of its container.
Most Zsh scripts scatter raw echo -e "\033[32m..." calls everywhere. shui
gives you a proper design system instead — semantic components, a token-based
theme engine, and a single consistent API.
One file to source. No dependencies. Pure Zsh.
Examples throughout use
SHUI_ICONS=emojiso they work everywhere without a Nerd Font. Swap toSHUI_ICONS=nerdfor richer glyphs if you have one installed.
✨ Features
- Unified message API —
shui message <type> <text>covers success, error, warning, info, and muted in a single consistent command. - Token-based theme engine — swap colours, icons, and styles via environment variables without touching component code.
- 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 in constrained environments.
Head to Quick Start to get going.