framework-recipes
Framework Ecosystem Recipes
Use this skill when the user names a specific terminal UI framework or needs practical ecosystem guidance. Fetch current official docs when exact API syntax or version-specific behavior matters.
Rust recipes
Ratatui + Crossterm is the modern default for Rust full-screen TUIs. Structure apps around explicit state, event handling, and rendering functions. Use Crossterm for cross-platform terminal setup and events. Snapshot widgets at fixed sizes and integration-test the event loop through a PTY.
Guidelines:
- Keep terminal setup/cleanup in one guard.
- Render from immutable state where possible.
- Use constraints and layout primitives instead of absolute coordinates.
- Treat panics as terminal-cleanup events.
Python recipes
Textual fits substantial apps with widgets, CSS-like styling, workers, and test automation. Rich fits rich output, progress, markdown, tables, panels, and logging. prompt_toolkit fits shells, REPLs, completions, multiline editing, and custom key bindings. curses/ncurses fits classic dependency-light TUIs with careful cleanup.