dwgx/SmartCLI / skills/tui-ui
tui-ui
VerifiedDesign web-like user interfaces in the terminal and inside tmux with a cell-grid Canvas, CSS-like box model, flexbox/grid layout, and 17 reusable widgets such as Panel, Table, Card, ProgressBar, Meter, Tabs, Tree, Badge, Banner, and a braille line chart. Use when an agent needs a dashboard, panel, table, status page, TUI layout, tmux dashboard, screenshot-driven CLI/TUI replica, ANSI frame, truecolor render, pyte PNG screenshot smoke test, wide-character alignment, or a new terminal widget.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 18.0 KB |
| _selftest_effort_widgets.py | script | 4.9 KB |
| _shot_effort_widgets.py | script | 4.7 KB |
| examples/effort_selector.py | script | 22.1 KB |
| references/HARD-LESSONS.md | markdown | 7.5 KB |
| references/RENDERING-MODEL.md | markdown | 5.4 KB |
| references/effort-replica-spec.md | markdown | 11.8 KB |
| self_test.py | script | 5.7 KB |
| ui/__init__.py | script | 1.4 KB |
| ui/__main__.py | script | 183 B |
| ui/box.py | script | 9.2 KB |
| ui/cli.py | script | 8.7 KB |
| ui/core.py | script | 26.0 KB |
| ui/field.py | script | 19.7 KB |
| ui/layout.py | script | 11.1 KB |
| ui/raster.py | script | 27.9 KB |
| ui/registry.py | script | 2.7 KB |
| ui/sixel.py | script | 9.2 KB |
| ui/widgets.py | script | 24.3 KB |
| ui/widgets_ext/__init__.py | script | 207 B |
| ui/widgets_ext/braille_chart.py | script | 6.7 KB |
| ui/widgets_ext/fuzzy_filter_list.py | script | 5.0 KB |
| ui/widgets_ext/gradient_rule.py | script | 3.5 KB |
| ui/widgets_ext/preview_pane.py | script | 3.1 KB |
| ui/widgets_ext/radial_glow.py | script | 8.8 KB |
| ui/widgets_ext/slider_track.py | script | 7.7 KB |
ui/__init__.py
View on GitHub"""tui-ui — an HTML/CSS-like terminal layout engine + web-style widgets.
Design web-like UIs in the terminal (and inside tmux): a cell-grid Canvas, a CSS
box model (margin/border/padding/content), flexbox/grid layout with ``fr`` units,
and composable widgets (Panel, Table, Card, ProgressBar, Tabs, Tree, ...). Output
is a tmux-safe ANSI string — printable, composable, and renderable to PNG by the
pyte harness.
Quick start::
from ui import Page, VStack, HStack, Panel, Table, get_theme
theme = get_theme("dashboard")
page = Page(VStack([Panel("hello", title="Hi", theme=theme)]), width=80, height=24)
print(page.to_ansi())
"""
from __future__ import annotations
from .core import (BOX_STYLES, Canvas, Cell, Theme, THEMES, draw_border,
get_theme, gradient, parse_color, rgb, theme_names, width)
from .box import Box, Fr
from .layout import Grid, HStack, Page, Stack, VStack, grid, resolve_tracks
from .sixel import encode_sixel, print_sixel, raster_to_sixel, supports_sixel
from . import registry
__all__ = [
"Canvas", "Cell", "Theme", "THEMES", "BOX_STYLES", "draw_border",
"get_theme", "theme_names", "gradient", "parse_color", "rgb", "width",
"Box", "Fr", "VStack", "HStack", "Stack", "Grid", "grid", "Page",
"resolve_tracks", "registry",
# sixel graphics output
"encode_sixel", "raster_to_sixel", "print_sixel", "supports_sixel",
]
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |