Skip to content

Ratatui

A Rust library for building text-based user interfaces that run in a terminal.

Stars
23.1k
Forks
820
Licence
MIT
Language
Rust
Last update
5 days ago
Type
Library

What it is

Ratatui is a Rust crate (library) for building terminal user interfaces, the text-based screens you see in command-line tools, dashboards, and interactive console programs. It gives developers a way to draw layouts and widgets in the terminal without writing low-level screen code. The README describes it as simple and flexible, and it was forked from the tui-rs crate in 2023 to continue that work.

  • Create a new terminal app from the official cargo-generate templates
  • Render text and widgets inside a terminal frame with a simple render function
  • Study the widget and app examples to learn how to structure a TUI program

Great for

  • Rust developers building interactive command-line tools or dashboards
  • Developers who want a terminal UI library with an active community and documentation
  • Developers targeting small embedded devices via no_std and a backend such as Mousefood

Not ideal for

  • People who want a finished end-user application rather than a library to build one (no ready-made app is described in the README)
  • Developers not using Rust, since this is a Rust crate
  • Projects that need a GUI in a window rather than a terminal interface
Step-by-step guide: how to use RatatuiInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Rust and Cargo

    Install cargo-generate

    cargo install --locked cargo-generate

    Generate a project from the Ratatui templates

    cargo generate ratatui/templates
  2. 2

    Run it

    • Install cargo-generate using the command in the README.
    • Run cargo generate ratatui/templates and select the Hello World template.
    • Build and run the generated project with Cargo.
    • Press any key to exit the Hello World example.
  3. 3

    Get the most out of it

    • Browse the widget examples in the repository to learn available widgets
    • Read the Ratatui website tutorials for step-by-step concepts
    • Use the awesome-ratatui list to find real apps built with the library for inspiration
    • For no_std targets, enable the layout-cache feature as described in the README

Downloads

Strengths

  • Official templates and a documentation site help newcomers get started quickly
  • Published on crates.io with full API docs on docs.rs and a changelog
  • Supports no_std targets such as microcontrollers, per the README

Trade-offs

  • Requires knowledge of Rust to use, so it is not a tool for non-programmers
  • The README is truncated here, so detailed API behavior and platform support are not verified from this source
  • Being a library, you must build and maintain your own application on top of it

How it compares

ProjectStarsTypeLevelUpdatedBest for
ratatui (this)23.1kLibraryintermediate5 days agoRust developers building interactive command-line tools or dashboards
Terminal.Gui11.3kLibraryintermediate7 days agoC# / .NET developers building terminal tools with forms, tables or menus
tui-rs10.9kLibraryintermediate3.3 years agoRust developers who want to build a terminal dashboard and are willing to use existing code
FTXUI10.9kLibraryintermediate5 days agoC++ developers who want interactive text-based tools in the terminal
yazi43.2kAppintermediate4 days agoPeople who already spend time in a terminal and want a faster way to browse folders
textual37.6kFrameworkbeginner28 days agoPython developers who want a terminal app with buttons, tables and forms

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.