← Projects
MIT · Zero dependencies · Pure Zsh

shui · 水

Shell UI for Zsh — a design system for your terminal. Semantic components, a token-based theme engine, and one consistent API. 水: fluid by design.

20+
Components
3
Themes
0
Dependencies
1
File to source
The problem

Stop hand-rolling ANSI escapes

Most Zsh scripts scatter raw escape codes everywhere — unreadable, inconsistent, impossible to theme. shui replaces them with a real design system: semantic components you compose, and tokens you restyle.

without shui
echo -e "\033[32m✓\033[0m Deployed"
echo -e "\033[1;31m✗\033[0m Build failed"
echo -e "\033[33m⚠\033[0m  Low disk space"
with shui
shui message success "Deployed"
shui message error   "Build failed"
shui message warning "Low disk space"
The system

A component for every part of your output

Twenty-plus semantic components — messages, layout, inline tags, boxes, tables, progress, and interactive prompts — all sharing one consistent API. You compose your script's output instead of painting it by hand.

messages
$ shui message success "Deployed to production"
✅ Deployed to production
$ shui message error "Connection refused"
❌ Connection refused
$ shui message warning "API key expires in 3 days"
⚠️ API key expires in 3 days
tables
$ shui table "Package|Version|Status" "node|20.11.0|OK" "bun|1.1.3|OK"
┌─────────┬──────────┬────────┐
│ Package │ Version  │ Status │
├─────────┼──────────┼────────┤
│ node    │ 20.11.0  │ OK     │
│ bun     │ 1.1.3    │ OK     │
└─────────┴──────────┴────────┘
progress
$ shui progress 50 100 --label="Downloading "
Downloading ████████████████████░░░░░░░░░░░░░░░░░░░░ 50%
interactive prompts
$ shui confirm "Deploy to production?"
? Deploy to production? › (y/N)

$ shui select "Pick an environment" staging production
? Pick an environment ›
  ❯ staging
    production
The theme engine

Tokens, not hardcoded colours

Every component reads from a token layer — colours, icons, and styles set by environment variables. Swap a theme or an icon set and your whole output restyles, without touching a single component call. That is what makes shui a design system and not a bag of helpers.

restyle everything from the outside
SHUI_THEME=minimal     # default · minimal — swap the whole look
SHUI_ICONS=emoji       # nerd-font glyphs → emoji, instantly
NO_COLOR=1             # respected automatically, degrades to plain ASCII
Features

Built for real shell scripts

Everything you need to give your scripts a consistent, themeable voice.

Unified message API

One command for success, error, warning, info, and muted messages — no escape codes in sight.

Token-based themes

Swap colours, icons, and styles via environment variables, without touching component code.

Inline components

Badges and pills write to stdout without a newline, composing naturally inside command substitutions.

Interactive prompts

confirm, select, radio, multiselect, and input — keyboard navigation and sensible defaults included.

Progress & spinners

progress, spinner, and loader, with optional native iTerm2 dock badge integration.

Zero dependencies

A single source file, pure Zsh. No npm, no brew, nothing to install. And NO_COLOR aware out of the box.

Quick start

Up and running in seconds

zsh
git clone https://github.com/kud/shui ~/.shui
source ~/.shui/shui.zsh

shui message success "Deployment complete"

Ready to make your scripts beautiful?

The full component reference, the theming guide, icon sets, and configuration all live in the docs.

Read the documentation →