Inline Mode
Stable UI at top/bottom while logs scroll above. Preserves scrollback history that other TUI frameworks destroy.
Stitched together from the finest Rust algorithms and brought to life with deterministic math. Minimal, high-performance, and architecturally pure.
Composable, focused modules
Days from scratch
Alien-artifact quality
Searchable TUI dictionary
Not another Ratatui wrapper. FrankenTUI is a ground-up TUI kernel with correctness guarantees, deterministic rendering, and algorithms borrowed from statistical machine learning.
Stable UI at top/bottom while logs scroll above. Preserves scrollback history that other TUI frameworks destroy.
Buffer → Diff → Presenter → ANSI pipeline with no hidden I/O. Every frame is reproducible and testable.
TerminalWriter serializes all stdout writes. No cursor corruption, no race conditions, no flicker.
TerminalSession restores terminal state even on panic. Your terminal is never left in a broken state.
12 focused crates: layout, text, style, runtime, widgets. Add only what you need, nothing more.
Bayesian diff strategy, BOCPD resize coalescing, conformal prediction alerts, e-process monitoring. Not heuristics — math.
From dashboards to data visualization, file browsers to visual effects. Every screenshot is a real terminal render -- no mocked designs.
FrankenTUI bakes correctness guarantees into the kernel layer. Features that require app-level discipline in other frameworks are enforced by the architecture.
| Feature | FrankenTUI | Ratatui | tui-rs | Raw crossterm |
|---|---|---|---|---|
| Inline mode w/ scrollback | ✓First-class | ⚠App-specific | ⚠App-specific | ✕Manual |
| Deterministic buffer diff | ✓Kernel-level | ⚠Yes | ⚠Yes | ✕No |
| One-writer rule | ✓Enforced | ⚠App-specific | ⚠App-specific | ✕No |
| RAII teardown | ✓TerminalSession | ⚠App-specific | ⚠App-specific | ✕No |
| Snapshot/time-travel harness | ✓Built-in | ✕No | ✕No | ✕No |
| Bayesian diff strategy | ✓Built-in | ✕No | ✕No | ✕No |
| Resize coalescing (BOCPD) | ✓Built-in | ✕No | ✕No | ✕No |
| Alpha blending / compositing | Porter-Duff | ✕No | ✕No | ✕No |
| Elm architecture runtime | ✓Built-in | ⚠App-specific | ⚠App-specific | ✕No |
| Conformal prediction alerts | ✓Built-in | ✕No | ✕No | ✕No |
| Zero unsafe in render path | Enforced (#![forbid]) | Minimized | ✕No | ✕No |
A complete interactive app in under 40 lines. The Elm/Bubbletea-style architecture separates model, update, and view into clean, testable functions.
1use ftui_core::event::Event;2use ftui_core::geometry::Rect;3use ftui_render::frame::Frame;4use ftui_runtime::{App, Cmd, Model, ScreenMode};5use ftui_widgets::paragraph::Paragraph;6 7struct TickApp {8 ticks: u64,9}10 11#[derive(Debug, Clone)]12enum Msg {13 Tick,14 Quit,15}16 17impl From<Event> for Msg {18 fn from(e: Event) -> Self {19 match e {20 Event::Key(k) if k.is_char('q') => Msg::Quit,21 _ => Msg::Tick,22 }23 }24}25 26impl Model for TickApp {27 type Message = Msg;28 29 fn update(&mut self, msg: Msg) -> Cmd<Msg> {30 match msg {31 Msg::Tick => {32 self.ticks += 1;33 Cmd::none()34 }35 Msg::Quit => Cmd::quit(),36 }37 }38 39 fn view(&self, frame: &mut Frame) {40 let text = format!("Ticks: {} (press 'q' to quit)", self.ticks);41 let area = Rect::new(0, 0, frame.width(), 1);42 Paragraph::new(text).render(area, frame);43 }44}45 46fn main() -> std::io::Result<()> {47 App::new(TickApp { ticks: 0 })48 .screen_mode(ScreenMode::Inline { ui_height: 1 })49 .run()50}100 hours of focused engineering. Every decision documented, every algorithm justified. Here is how the first 3 milestones unfolded.
Initial commit: FrankenTUI plan documents.
Upgraded plan to a hybrid architecture (V5.0 → V6.1).
Expanded the bead graph to cover core components, dependencies, and acceptance tests.
Added a reference library sync script + build infrastructure.
Fixed idempotency and Makefile bugs in the sync tooling.
Seeded beads for syntax highlighting, forms/pickers, and other showcase surfaces.
Initialized the Rust workspace with the `ftui` crate structure.
Added 15 comprehensive feature beads with 46 subtasks.
Added a comprehensive test bead graph for 15 new feature areas.
From the Author
Jeffrey Emanuel
@jeffemanuel
“I just built a complete TUI framework in Rust from scratch in 5 days. 12 crates, 20+ algorithms including Bayesian diff strategy selection, BOCPD resize coalescing, and conformal prediction alerts. Not heuristics — real math.”
Jeffrey Emanuel
@jeffemanuel
“The 'alien artifact' quality bar: every statistical decision in FrankenTUI records an evidence ledger. You can literally read WHY the renderer chose dirty-row diff over full diff. No black boxes.”
Jeffrey Emanuel
@jeffemanuel
“FrankenTUI's inline mode preserves your scrollback while keeping UI chrome stable. This is the thing that Ratatui and every other Rust TUI framework gets wrong — they destroy your terminal history.”
Jeffrey Emanuel
@jeffemanuel
“Zero unsafe code in the entire render pipeline, runtime, and layout engine. #![forbid(unsafe_code)] at the crate level. Correctness over cleverness.”
Add FrankenTUI to your Rust project with a single command. Ship terminal interfaces with correctness guarantees from day one.
cargo add ftui