#ncurses #tui #ui


A TUI (Text User Interface) library focused on ease-of-use

59 releases

0.17.0-alpha.0 Jun 14, 2021
0.16.3 Jan 19, 2021
0.15.2 Feb 12, 2021
0.15.0 May 26, 2020
0.1.1 Jul 21, 2016

#3 in GUI

Download history 1916/week @ 2021-04-08 1996/week @ 2021-04-15 1943/week @ 2021-04-22 1908/week @ 2021-04-29 1766/week @ 2021-05-06 1843/week @ 2021-05-13 1602/week @ 2021-05-20 1604/week @ 2021-05-27 1510/week @ 2021-06-03 1682/week @ 2021-06-10 2148/week @ 2021-06-17 2328/week @ 2021-06-24 1985/week @ 2021-07-01 1831/week @ 2021-07-08 1693/week @ 2021-07-15 1633/week @ 2021-07-22

7,684 downloads per month
Used in 74 crates (71 directly)

MIT license

17K SLoC


crates.io Rust Build status (appveyor) MIT licensed Gitter chat

Cursive is a TUI (Text User Interface) library for rust. It uses ncurses by default, but other backends are available.

It allows you to build rich user interfaces for terminal applications.


It is designed to be safe and easy to use:

cursive = "0.16"

Or to use the latest git version:

cursive = { git = "https://github.com/gyscos/cursive" }

(You will also need ncurses installed.)

use cursive::views::{Dialog, TextView};

fn main() {
    // Creates the cursive root - required for every application.
    let mut siv = cursive::default();

    // Creates a dialog with a single "Quit" button
    siv.add_layer(Dialog::around(TextView::new("Hello Dialog!"))
                         .button("Quit", |s| s.quit()));

    // Starts the event loop.

Cursive dialog example

Check out the other examples to get these results, and more:

edit.rs example lorem.rs example menubar.rs example select.rs example mines example theme.rs example

(Colors may depend on your terminal configuration.)


These tutorials may help you get started with cursive:

Third-party views

Here are a few crates implementing new views for you to use:


Here are some cool applications using cursive:

  • RustyChat: Chat client made using Rust and Cursive.
  • clock-cli: A clock with stopwatch and countdown timer functionalities.
  • fui: Add CLI & form interface to your program.
  • git-branchless: Branchless workflow for Git.
  • grin-tui: Minimal implementation of the MimbleWimble protocol.
  • kakikun: A paint and ASCII art application for the terminal.
  • mythra: CLI to search for music.
  • ncspot: Cross-platform ncurses Spotify client.
  • ripasso: A simple password manager written in Rust.
  • rusty-man: Browse rustdoc documentation.
  • so: A terminal interface for Stack Overflow.
  • sudoku-tui: Play sudoku on the command line.
  • launchk: Manage launchd agents and daemons on macOS.


  • Ease of use. Simple apps should be simple. Complex apps should be manageable.
  • Linux TTY Compatibility. Colors may suffer, and UTF-8 may be too much, but most features must work properly on a Linux TTY.
  • Flexibility. This library should be able to handle simple UI scripts, complex real-time applications, or even games.
    • In particular, it tries to have enough features to recreate these kind of tools:


First off, terminals are messy. A small set of features is standard, but beyond that, almost every terminal has its own implementation.


  • Colors: the basic 8-colors palette should be broadly supported. User-defined colors is not supported in the raw linux TTY, but should work in most terminals, although it's still kinda experimental.
  • UTF-8: Currently Cursive really expects a UTF-8 locale. It may eventually get patched to support window borders on other locales, but it's not a priority. There is initial support for wide characters. RTL support is planned, but still very early.


  • The key_codes example can be a useful tool to see how the library reacts to various key presses.
  • Keep in mind that if the terminal has shortcuts registered, they probably won't be transmitted to the app.
  • UTF-8 input should work fine in a unicode-enabled terminal emulator, but raw linux TTY may be more capricious.



See also tui-rs - and a small comparison page.


~80K SLoC