- Read
docs/getting-started.md - Run
bun run build-ffi - Start with
bun run dev,bun run anitrack,examples/snake.ts, orexamples/typing-speed.ts - Use
docs/components-and-styling.mdfor current public props - Use
docs/state-events-lifecycle.mdfor signals, focus, input, and cleanup - Use
docs/text-layout-overflow-spec.mdfor multiline text / overflow design - Use
docs/releasing.mdwhen cutting a new npm release
- layout primitives:
Box,Row,Column - leaf nodes:
Text,Input,Button - shared style props live in
StyleProps: borders, padding, colors, flex, sizing, min/max, margins, alignment, wrapping - box-only props live in
BoxProps:gap,direction - direction supports
row,column,rowReverse,columnReverse - current docs treat code as source of truth; anything outside exported prop types is not public API
- JS keeps a previous sent-tree snapshot and compares it against the current node tree each frame
- compatible tree shape => send style deltas and text ops only
- incompatible tree shape => clear Rust tree state and rebuild it once
- Rust owns persistent tree state, layout, paint, terminal buffers, and incremental flush
- debug metrics phases:
serialize,textSync,rust,sync,flush
examples/smoke.ts: deterministic PTY smoke target for CI and agentsexamples/anitrack.ts: interactive torrent-search demoexamples/snake.ts: keyboard-driven snake game with stable grid nodesexamples/typing-speed.ts: centered Colemak Mod-DH typing testerexamples/ai-agent.ts: keyboard-driven split-pane demoexamples/visualizer.ts: metrics-friendly animated renderer stress demo
Repo-local agent skills live in .agents/skills/.
.agents/skills/letui-api-doc-drift/SKILL.md: docs/API drift workflow for this repo.agents/skills/letui-smoke-runner/SKILL.md: manual and CI-style TUI smoke validation.agents/skills/kitty-tui-control/SKILL.md: kitty tab/window control for interactive terminal testing
- use Bun, not Node, for runtime in this repo
- colors are numeric hex (
0xRRGGBB), not CSS strings Ctrl+Qis always the default quit path- keep node identity stable when possible; recreating whole subtrees defeats incremental sync
- examples and scripts are part of typecheck; if docs drift from code, fix docs/examples first