All Projects → gyscos → Cursive

gyscos / Cursive

Licence: mit
A Text User Interface library for the Rust programming language

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Cursive

Tuicss
Text-based user interface CSS library
Stars: ✭ 167 (-93.61%)
Mutual labels:  terminal, tui, ncurses
Nnn
n³ The unorthodox terminal file manager
Stars: ✭ 13,138 (+402.79%)
Mutual labels:  terminal, ncurses, tui
Neix
neix - a RSS/Atom feed reader for your terminal.
Stars: ✭ 128 (-95.1%)
Mutual labels:  terminal, tui, ncurses
Tvision
A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. Now cross-platform and with Unicode support.
Stars: ✭ 612 (-76.58%)
Mutual labels:  terminal, tui, ncurses
Mandown
man-page inspired Markdown viewer
Stars: ✭ 173 (-93.38%)
Mutual labels:  terminal, tui, ncurses
Turbo
An experimental text editor based on Scintilla and Turbo Vision.
Stars: ✭ 78 (-97.01%)
Mutual labels:  terminal, tui, ncurses
Termox
C++17 Terminal User Interface(TUI) Library.
Stars: ✭ 306 (-88.29%)
Mutual labels:  terminal, tui, ncurses
Dte
A small, configurable console text editor (moved to https://gitlab.com/craigbarnes/dte)
Stars: ✭ 98 (-96.25%)
Mutual labels:  terminal, tui, ncurses
Goaccess
GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
Stars: ✭ 14,096 (+439.46%)
Mutual labels:  terminal, tui, ncurses
Twterm
A full-featured TUI Twitter client
Stars: ✭ 186 (-92.88%)
Mutual labels:  terminal, ncurses
Rust Battop
Interactive batteries viewer
Stars: ✭ 133 (-94.91%)
Mutual labels:  terminal, tui
Programmer Calculator
Terminal calculator made for programmers working with multiple number representations, sizes, and overall close to the bits
Stars: ✭ 135 (-94.83%)
Mutual labels:  terminal, ncurses
Smenu
smenu started as a lightweight and flexible terminal menu generator, but quickly evolved into a powerful and versatile CLI selection tool for interactive or scripting use.
Stars: ✭ 1,906 (-27.06%)
Mutual labels:  terminal, tui
Lazyhub
lazyhub - Terminal UI Client for GitHub using gocui.
Stars: ✭ 133 (-94.91%)
Mutual labels:  terminal, tui
Pspg
Unix pager (with very rich functionality) designed for work with tables. Designed for PostgreSQL, but MySQL is supported too. Works well with pgcli too. Can be used as CSV or TSV viewer too. It supports searching, selecting rows, columns, or block and export selected area to clipboard.
Stars: ✭ 1,749 (-33.07%)
Mutual labels:  tui, ncurses
Bottom
Yet another cross-platform graphical process/system monitor.
Stars: ✭ 3,182 (+21.78%)
Mutual labels:  terminal, tui
Tig
Text-mode interface for git
Stars: ✭ 10,497 (+301.72%)
Mutual labels:  tui, ncurses
Kubebox
⎈❏ Terminal and Web console for Kubernetes
Stars: ✭ 1,855 (-29.01%)
Mutual labels:  terminal, tui
Tui Go
A UI library for terminal applications.
Stars: ✭ 2,015 (-22.89%)
Mutual labels:  terminal, tui
Hascard
flashcard TUI with markdown cards
Stars: ✭ 171 (-93.46%)
Mutual labels:  terminal, tui

Cursive

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.

Documentation

It is designed to be safe and easy to use:

[dependencies]
cursive = "0.16"

Or to use the latest git version:

[dependencies]
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!"))
                         .title("Cursive")
                         .button("Quit", |s| s.quit()));

    // Starts the event loop.
    siv.run();
}

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.)

Tutorials

These tutorials may help you get started with cursive:

Third-party views

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

Showcases

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.

Goals

  • 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:

Compatibility

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

Output

  • 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.

Input

  • 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.

Contributing

Alternatives

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].