Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

ratatui

> 开发工具
Open source

A Rust crate for cooking up terminal user interfaces (TUIs) 👨‍🍳🐀 https://ratatui.rs

22.0K stars0 likes0 views
WebsiteGitHub

About

A Rust crate for cooking up terminal user interfaces (TUIs) 👨‍🍳🐀 https://ratatui.rs

Table of Contents
  • Quickstart
  • Documentation
  • Templates
  • Built with Ratatui
  • Alternatives
  • Contributing
  • Acknowledgements
  • License

Ratatui (ˌræ.təˈtu.i) is a Rust crate for cooking up terminal user interfaces (TUIs). It provides a simple and flexible way to create text-based user interfaces in the terminal, which can be used for command-line applications, dashboards, and other interactive console programs.

Quickstart

Ratatui has templates available to help you get started quickly. You can use the cargo-generate command to create a new project with Ratatui:

bash
cargo install --locked cargo-generate
cargo generate ratatui/templates

Selecting the Hello World template produces the following application:

rust
use color_eyre::Result;
use crossterm::event::{self, Event};
use ratatui::{DefaultTerminal, Frame};

fn main() -> Result<()> {
    color_eyre::install()?;
    let terminal = ratatui::init();
    let result = run(terminal);
    ratatui::restore();
    result
}

fn run(mut terminal: DefaultTerminal) -> Result<()> {
    loop {
        terminal.draw(render)?;
        if matches!(event::read()?, Event::Key(_)) {
            break Ok(());
        }
    }
}

fn render(frame: &mut Frame) {
    frame.render_widget("hello world", frame.area());
}

Documentation

  • Docs - the full API documentation for the library on docs.rs.
  • Ratatui Website - explains the library's concepts and provides step-by-step tutorials.
  • Ratatui Forum - a place to ask questions and discuss the library.
  • Widget Examples - a collection of examples that demonstrate how to use the library.
  • App Examples - a collection of more complex examples that demonstrate how to build apps.
  • ARCHITECTURE.md - explains the crate organization and modular workspace structure.
  • Changelog - generated by git-cliff utilizing Conventional Commits.
  • Breaking Changes - a list of breaking changes in the library.

You can also watch the EuroRust 2024 talk to learn about common concepts in Ratatui and what's possible to build with it.

Templates

If you're looking to get started quickly, you can use one of the available templates from the templates repository using cargo-generate:

bash
cargo generate ratatui/templates

Built with Ratatui

Check out the showcase section of the website, or the awesome-ratatui repository for a curated list of awesome apps and libraries built with Ratatui!

Alternatives

  • Cursive - a ncurses-based TUI library.
  • iocraft - a declarative TUI library.

Contributing

Discord Badge Matrix Badge Forum Badge

Feel free to join our Discord server for discussions and questions! There is also a Matrix bridge available at #ratatui:matrix.org. We have also recently launched the Ratatui Forum.

We rely on GitHub for bugs and feature requests.

Please make sure you read the contributing guidelines before creating a pull request. We accept AI generated code, but please read the AI Contributions guidelines to ensure compliance.

If you'd like to show your support, you can add the Ratatui badge to your project's README:

markdown

Acknowledgements

Ratatui was forked from the tui-rs crate in 2023 in order to continue its development. None of this could be possible without Florian Dehau who originally created tui-rs which inspired many Rust TUIs.

Special thanks to Pavel Fomchenkov for his work in designing an awesome logo for the Ratatui project and organization.

License

This project is licensed under the MIT License.

Issues· 212 open

View all issuesOpen on GitHub
  • #1396

    Korean characters are not rendered correctly

    Type: BugUpdated Sep 24, 2026
  • #2754

    Unnecessary cursor Show + MoveTo emitted every frame on unchanged frames

    Type: BugUpdated Sep 19, 2026
  • #2767

    `portable-atomic` feature on `ratatui` does not forward to `ratatui-widgets`, breaking `no_std` builds on targets without atomic CAS

    Type: BugUpdated Sep 10, 2026
  • #2750

    `Test Libs 1.88.0` has never run on 1.88.0: ci.yml:306 hardcodes `stable` (same bug as #2106/#2116)

    Updated Sep 6, 2026
  • #1643

    Combine the layout examples

    Type: EnhancementUpdated Sep 5, 2026
  • #2742

    Blocking `flush()` on a full pty freezes the entire render loop, and there is no non-blocking / async escape hatch

    Type: BugUpdated Sep 3, 2026
  • #2610

    a11y support

    Type: EnhancementUpdated Aug 28, 2026
  • #1606

    Allow forcing an area to be redrawn

    Type: EnhancementUpdated Aug 27, 2026
  • #2734

    New kinds of underlined texts

    Type: EnhancementUpdated Aug 24, 2026
  • #2710

    Constraint::Length does not work properly when Flex::SpaceBetween is applied for single element

    Type: BugUpdated Aug 24, 2026

> Tags

Rustcliratatuirustterminal

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具