🪷 If you are interested in contributing to this project, please read our 📒 contributing guide.
R3BL TUI library & suite of apps focused on developer productivity
We are working on building command line apps in Rust which have rich text user interfaces (TUI). We want to lean into the terminal as a place of productivity, and build all kinds of awesome apps for it.
🔮 Instead of just building one app, we are building a library to enable any kind of rich TUI development w/ a twist: taking concepts that work really well for the frontend mobile and web development world and re-imagining them for TUI & Rust.
- Draw inspiration from declarative and reactive frameworks for web, mobile, and desktop, to create responsive TUIs.
- The idea here is not to rebuild tmux in Rust (separate processes mux'd onto a single terminal window). Rather it is to build a set of integrated "apps" (or "tasks") that run in the same process that renders to one terminal window.
- Inside of this terminal window, we can implement things like "app" switching, routing, tiling layout, stacking layout, etc. so that we can manage a lot of TUI apps (which are tightly integrated) that are running in the same process, in the same window. So you can imagine that all these "app"s have shared application state. As the application state is modified via user input events, API callbacks, and animator updates, this results in performant re-renders, and repaints of only parts of the UI that have changed.
- Here are some examples of the types of "app"s we are building using this engine:
- multi user text editors w/ syntax highlighting
- integrations w/ github issues
- integrations w/ calendar, email, contacts APIs
🦜 To learn more about this library, please read how it was built (on developerlife.com):
- https://developerlife.com/2022/02/24/rust-non-binary-tree/
- https://developerlife.com/2022/03/12/rust-redux/
- https://developerlife.com/2022/03/30/rust-proc-macro/
🦀 You can also find all the Rust related content on developerlife.com here.
- Folder structure and code organization
- Issues, comments, feedback, PRs, and Discord
- ansi_color folder -> r3bl_ansi_color crate
- tuify folder -> r3bl_tuify crate
- tui folder -> r3bl_tui crate
This repo is organized as a monorepo. Each folder is a Rust crate. There's a Cargo.toml
file at the top level which provides a workspace that allows us to build all the crates in
this repo at the same time.
- To contribute please check out this page.
- Please report any issues to the issue tracker.
- Check out our contributor guide here.
- And if you have any feature requests, feel free to add them there too 👍.
- And we have a discord server if you would like to chat about the issue or PR.
Rust crate to generate formatted ANSI 256 (8-bit) and truecolor (24-bit) color output to stdout. On macOS, the default Terminal.app does not support truecolor, so ANSI 256 colors are used instead.
README for the r3bl_ansi_color crate.
This crate can be used in two ways:
As a library. This is useful if you want to add simple interactivity to your CLI app
written in Rust. You can see an example of this in the examples
folder in the
main_interactive.rs
file. You can run it using cargo run --example main_interactive
.
Here's a demo of the library target of this crate in action.
tuify-alpha-2023-09-07_21.45.08.mp4
As a binary. This is useful if you want to use this crate as a command line tool. The
binary target is called rt
.
Here's a demo of the binary target of this crate in action.
tuify-pipes-alpha-2023-09-10_11.22.12.mp4
For more information please read the README for the r3bl_tuify crate.
For more information please read the README for the r3bl_tui crate.
Here's a video of the demo in action:
Here's a video of a prototype of R3BL CMDR app built using this TUI engine.