Rxtui
reactive terminal interfaces for Rust. because CLIs deserve better.
Install / Use
/learn @superradcompany/RxtuiREADME
<b>——— reactive terminal UI framework for rust ———</b>
</div> <br /> <div align='center'> <a href="https://crates.io/crates/rxtui"> <img src="https://img.shields.io/crates/v/rxtui?style=for-the-badge&logo=rust&logoColor=white" alt="crates.io version"/> </a> <a href="./LICENSE"> <img src="https://img.shields.io/badge/license-Apache%202.0-blue?style=for-the-badge" alt="license"/> </a> <a href="./DOCS.md"> <img src="https://img.shields.io/badge/docs-comprehensive-%2300acee.svg?color=ff4500&style=for-the-badge&logo=gitbook&logoColor=white" alt="documentation"/> </a> </div> <br />[!WARNING]
This project is in early development. APIs may change, and bugs may exist.
<sub>WHY RXTUI?</sub>
Terminal UIs have traditionally been painful to build. You either work with low-level escape sequences (error-prone and tedious) or use immediate-mode libraries that require you to manage all state manually. RxTUI takes a different approach.
We bring the retained-mode, component-based architecture that revolutionized web development to the terminal:
- [x] Declarative UI - Describe what your UI should look like, not how to change it
- [x] True Composability - Build complex apps from simple, reusable components
- [x] Best of Both Worlds - Elm's message architecture meets React's components
- [x] TUI Optimizations - Automatic diffing, dirty tracking, and minimal redraws
- [x] Inline Mode - Render directly in terminal with persistent output for CLI tools
<sub>QUICK START</sub>
<span>1</span> Install RxTUI
Add to your Cargo.toml:
[dependencies]
rxtui = "0.1"
<span>2</span> Create Your First App
A simple working example showing separation of state management and UI building:
use rxtui::prelude::*;
#[derive(Component)]
struct Counter;
impl Counter {
#[update]
fn update(&self, _ctx: &Context, msg: &str, mut count: i32) -> Action {
match msg {
"inc" => Action::update(count + 1),
"dec" => Action::update(count - 1),
_ => Action::exit(),
}
}
#[view]
fn view(&self, ctx: &Context, count: i32) -> Node {
node! {
div(
pad: 2,
align: center,
w_frac: 1.0,
gap: 1,
@key(up): ctx.handler("inc"),
@key(down): ctx.handler("dec"),
@key(esc): ctx.handler("exit")
) [
text(format!("Count: {count}"), color: white, bold),
text("use ↑/↓ to change, esc to exit", color: bright_black)
]
}
}
}
fn main() -> std::io::Result<()> {
App::new()?.run(Counter)
}
<span>3</span> Run Your App
cargo run
<img width="100%" alt="counter demo" src="https://github.com/user-attachments/assets/c841f1e6-8bf9-4b5a-bed5-97bc31cc3537" />
<div align='center'>• • •</div>
<sub>DOCUMENTATION</sub>
| Document | Description | | ----------------------------------------- | ------------------------------------------ | | Examples | Collection of example apps | | Documentation | Complete framework documentation | | Tutorial | Step-by-step guide from basics to advanced | | API Reference | Detailed API documentation | | Quick Reference | Handy cheat sheet for common patterns | | Implementation | Internal architecture details |
<div align='center'>• • •</div><sub>DEVELOPMENT</sub>
Want to contribute? We'd love to have you!
- Development Guide - Set up your dev environment
- Contributing - Contribution guidelines
- GitHub Issues - Report bugs or request features
<sub>LICENSE</sub>
This project is licensed under the Apache License 2.0.
Related Skills
himalaya
346.4kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
node-connect
346.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
taskflow
346.4kname: taskflow description: Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layer
frontend-design
107.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
