Registry / cli / console

console

JSON →
library0.16.3rscratesunverified

A terminal and console abstraction for Rust.

# Cargo.toml [dependencies] console = "0.16.3"
INSTALL
IMPORT
SIG · CONSOLE
C
console
clirustv0.16.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Term
use console::Term;

Interact with the terminal, get size, and write output.

use console::Term; fn main() { let term = Term::stdout(); term.write_line("Hello, world!").unwrap(); let size = term.size(); println!("Terminal size: {}x{}", size.0, size.1); }
Debug
Known issues
gotchaSome features (like colors) require the 'ansi' feature.
fix
Enable the 'ansi' feature in Cargo.toml: console = { version = "0.16", features = ["ansi"] }
affects: >=0.15.0
Upgrade
Version history
0.16.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
18
Amazon
1
Resources
console — cargo add console · libregistry