rust-tui-ratatui
Rust TUI Ratatui
Build terminal applications with clear state ownership, predictable rendering, responsive input, and testable UI contracts.
Operating Model
- Identify whether the app is a true TUI, a CLI with occasional prompts, or a daemon dashboard. Use Ratatui only when persistent terminal state and interactive views are justified.
- Keep rendering pure: widgets read immutable view models and write to frames. Event handlers mutate application state through explicit actions.
- Use an app/event/action/update/render shape for nontrivial TUIs. Avoid spreading terminal I/O across widgets.
- Treat terminal cleanup as reliability-critical. Restore raw mode and alternate screen on all normal and error exits.
- Preserve accessibility of terminal UX: discoverable keybindings, no required color-only state, clear focus, and deterministic fallback for narrow terminals.
Reference Map
references/ratatui-app-architecture.mdfor app structure, state machines, view models, layout, widgets, and theme ownership.references/events-async-terminal.mdfor crossterm, async tasks, cancellation, terminal restoration, and resize handling.references/testing-ux.mdfor buffer assertions, insta snapshots, keybinding tests, and performance checks.
Defaults
More from bjornmelin/dev-skills
streamdown
|
13zod-v4
Expert guidance for Zod v4 schema validation in TypeScript. Use when designing schemas, migrating from Zod 3, handling validation errors, generating JSON Schema/OpenAPI, using codecs/transforms, or integrating with React Hook Form, tRPC, Hono, or Next.js. Covers all Zod v4 APIs including top-level string formats, strictObject/looseObject, metadata, registries, branded types, and recursive schemas.
9vitest-dev
World-class Vitest QA/test engineer for TypeScript + Next.js (local + CI performance focused)
8docker-architect
SOTA Docker/Compose architecture, implementation, refactor, and security hardening. Use when working on containerization tasks such as creating or rewriting Dockerfiles, docker-compose files, buildx/bake configs, .dockerignore, and CI pipelines for build/test/scan/publish; auditing existing container setups for security, correctness, size/perf, and best practices (least privilege, non-root, minimal images, pinned base images, BuildKit secrets, healthchecks); debugging Docker build/run issues; or designing dev vs prod compose workflows across services (DB/cache/queues) with correct networking, volumes, secrets, and resource limits.
7pytest-dev
World-class pytest engineer for Python: write/refactor tests, fix flakiness, design fixtures/markers, add coverage, speed up suites (collection/runtime), and optimize CI (GitHub Actions sharding, xdist parallelism, caching). Use when asked about pytest best practices, pytest 9.x features (subtests, strict mode, TOML config), pytest plugins (xdist/cov/asyncio/mock/httpx), or test performance/CI tuning.
6notebook-ml-architect
>
5