cirious_codex_term 0.1.0

Next-generation native ANSI terminal control and formatting.
Documentation
  • Coverage
  • 99.22%
    127 out of 128 items documented23 out of 89 items with examples
  • Size
  • Source code size: 43.86 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 799.51 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • cirious-studio/cirious_codex_term
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • cirious-foundation github:cirious-studio:admins

🖥️ Cirious Codex Term

Native ANSI Terminal Control & Formatting

CI Crates.io Docs.rs Language License


📖 Overview

Cirious Codex Term is a highly optimized, dependency-free foundational library for terminal manipulation. It provides native ANSI escape sequence generation for colors, text styling, and full cursor control.

Designed to be the ultimate bedrock for CLI tools within the Cirious ecosystem, prioritizing zero-cost abstractions and flawless terminal integration.

✨ Features

  • Core color manipulation (16 colors, 256 colors, TrueColor RGB).
  • Text formatting traits (Bold, Italic, Blink, Dim, etc.).
  • Absolute and relative cursor positioning.
  • Screen manipulation and clearing.

🚀 Quick Start

Add the following to your Cargo.toml:

[dependencies]
cirious_codex_term = "0.1"

And then in your code:

use cirious_codex_term::{Color, Cursor, Screen, Style, StyleExt};
 
fn main() {
  // Clear the screen
  Screen::clear();
   
  // Move cursor and print styled text
  Cursor::set_position(5, 5);
  print!(
    "{} {}Hello, Codex Term!{}",
    Style::Bold.to_str(),
    Color::Cyan.to_fg_str(),
    Style::Reset.to_str()
  );
   
  // Use extension traits for fluent styling
  println!("{}", "This text is red and underlined".red().underline());
   
  // Hide cursor
  Cursor::hide();
   
  // Move cursor and print again
  Cursor::set_position(10, 10);
  println!("{}", "Cursor is hidden!".green());
   
  // Show cursor
  Cursor::show();
}

🚧 Current Status & Roadmap

The architecture is currently being mapped out for the upcoming v0.2 release:

  • Windows ANSI: Auto-enable native ANSI support on Windows.
  • Terminal Dimensions: Methods to query terminal width and height dynamically.
  • Raw Mode Toggle: Ability to switch the terminal to raw mode for unbuffered, character-by-character input reading.
  • NO_COLOR Standard: Automatic respect for the NO_COLOR environment variable to disable styling dynamically.
  • Async Key Events: Foundational support for reading non-blocking keyboard and mouse events.

📜 License

Licensed under either of the following, at your option: