← 全部工具

Dicklesworthstone/frankentui

热度 70 更新于 网络与系统管理

Minimal, high-performance terminal UI kernel with diff-based rendering, inline mode, and RAII terminal cleanup

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

FrankenTUI (ftui)

███████╗██████╗  █████╗ ███╗   ██╗██╗  ██╗███████╗███╗   ██╗████████╗██╗   ██╗██╗
██╔════╝██╔══██╗██╔══██╗████╗  ██║██║ ██╔╝██╔════╝████╗  ██║╚══██╔══╝██║   ██║██║
█████╗  ██████╔╝███████║██╔██╗ ██║█████╔╝ █████╗  ██╔██╗ ██║   ██║   ██║   ██║██║
██╔══╝  ██╔══██╗██╔══██║██║╚██╗██║██╔═██╗ ██╔══╝  ██║╚██╗██║   ██║   ██║   ██║██║
██║     ██║  ██║██║  ██║██║ ╚████║██║  ██╗███████╗██║ ╚████║   ██║   ╚██████╔╝██║
╚═╝     ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝   ╚═╝    ╚═════╝ ╚═╝

<div align="center" <img src="docs/assets/frankentuiillustration.webp" alt="FrankenTUI - Minimal, high-performance terminal UI kernel" </div

High‑performance terminal UI kernel -- 1.1M+ lines of Rust across 20 crates, 80+ widget/stateful-widget implementations, 45 interactive demo screens, a Bayesian intelligence layer, resizable pane workspaces, and in-tree web/WASM backends -- focused on correctness, determinism, and clean architecture.

Try It in Your Browser

All 45 screens run as WASM at frankentui.com/web — no install, no toolchain. It renders through WebGPU where that exists and falls back to canvas2d, so Chrome, Edge, Safari and Firefox all work.

Phones too: swipe in from either edge to change screens, and the bar along the bottom carries a button for every key the current screen uses. Press and hold to drag; a divider drags straight away.

Quick Run (from source)

The primary way to see what the system can do is the demo showcase: cargo run -p ftui-demo-showcase (not the harness).

# Download source with curl (no installer yet)
curl -fsSL https://codeload.github.com/Dicklesworthstone/frankentui/tar.gz/main | tar -xz
cd frankentui-main

# Run the demo showcase (primary way to see what FrankenTUI can do)
cargo run -p ftui-demo-showcase

Or clone with git:

git clone https://github.com/Dicklesworthstone/frankentui.git
cd frankentui
cargo run -p ftui-demo-showcase

---

TL;DR

The Problem: Most TUI stacks make it easy to draw widgets, but hard to build correct, flicker‑free, inline UIs with strict terminal cleanup and deterministic rendering.

The Solution: FrankenTUI is a kernel‑level TUI foundation with a disciplined runtime, diff‑based renderer, and inline‑mode support that preserves scrollback while keeping UI chrome stable.

Why Use FrankenTUI?

| Feature | What It Does | Example | |---------|--------------|---------| | Inline mode | Stable UI at top/bottom while logs scroll above | ScreenMode::Inline { uiheight: 10 } in the runtime | | Deterministic rendering | Buffer → Diff → Presenter → ANSI, no hidden I/O | BufferDiff::compute(&prev, &next) | | One‑writer rule | Serializes output for correctness | TerminalWriter owns all stdout writes | | RAII cleanup | Terminal state restored even on panic | TerminalSession in ftui-core | | Composable crates | Layout, text, style, runtime, widgets | Add only what you need | | 80+ widgets | Block, Paragraph, Table, Input, Tree, Modal, Command Palette, etc. | Direct Widget / StatefulWidget implementations across ftui-widgets | | Pane workspaces | Drag‑to‑resize, docking, magnetic snap, inertial throw, undo/redo | PaneTree + PaneDragResizeMachine in ftui-layout | | Web/WASM backend | Same Rust core renders in browser-oriented environments | In-tree ftui-web + ftui-showcase-wasm | | Bayesian intelligence | Statistical diff strategy, resize coalescing, capability detection | BOCPD, VOI, conformal prediction, e‑processes | | Shadow‑run validation | Prove rendering determinism across runtime migrations | ShadowRun::compare() in ftui-harness | | 45 demo screens | Dashboard, visual effects, widget gallery, layout lab, and more | cargo run -p ftui-demo-showcase |