ConstInitialize the framework with a terminal implementation. Must be called before cel.viewport.
Enables the Kitty keyboard protocol (level 1) and bracketed paste mode via the terminal, enters raw mode, and starts mouse tracking.
Request a re-render. Call this after state changes.
Batched via process.nextTick() — multiple calls within the same
tick produce a single render.
Set the terminal window or tab title.
This is an imperative side effect, not part of the render tree. Control characters are stripped from the title before writing the terminal sequence. Best effort only — some hosts may ignore it.
Stop the framework and restore terminal state.
Pops the Kitty keyboard protocol mode, disables bracketed paste and mouse tracking, and restores the terminal to its previous state.
Set the render function that returns the UI tree. Triggers the first render automatically.
A function that returns the current UI tree.
cel-tui framework entrypoint.
The framework is stateless — it renders whatever tree the render function returns. State management is fully external. Use any approach you like (plain variables, classes, libraries) and call cel.render when state changes.