cactui 0.1.0

Terminal-based interactive prompts and key menus for CLI applications
Documentation
  • Coverage
  • 64.29%
    27 out of 42 items documented0 out of 20 items with examples
  • Size
  • Source code size: 71.7 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 805.2 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • nobane

cactui

Terminal-based interactive prompts and key menus for CLI applications.

Features

  • InlinePrompt: Interactive text input with support for multi-line editing, placeholders, and escape-to-exit mode
  • KeyMenu: Configurable key-based menus with callbacks, submenus, and custom headers
  • Text Wrapping: Utilities for calculating and splitting text based on terminal width

Usage

use cactui::inline_prompt::InlinePrompt;
use anyhow::Result;

fn main() -> Result<()> {
    let name = InlinePrompt::input("Enter your name:", None)?;
    println!("Hello, {}!", name);
    Ok(())
}

License

MIT