shui

👋 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=emoji so they work everywhere without a Nerd Font. Swap to SHUI_ICONS=nerd for richer glyphs if you have one installed.

✨ Features

  • Unified message APIshui 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 componentsbadge and pill write to stdout without a newline, composing naturally inside $(...) expressions.
  • Interactive promptsconfirm, select, radio, multiselect, and input with keyboard navigation and sensible defaults.
  • Progress & spinnersprogress, spinner, and loader with optional native iTerm2 dock badge integration.
  • Zero dependencies — a single source shui.zsh is 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.

On this page