#cli

liveterm

Simple live-updating output for CLI apps

3 releases (breaking)

0.3.0 Jun 27, 2021
0.2.0 Feb 1, 2021
0.1.0 Feb 1, 2021

#3039 in #cli

Download history 382/week @ 2024-09-02 239/week @ 2024-09-09 312/week @ 2024-09-16 414/week @ 2024-09-23 274/week @ 2024-09-30 209/week @ 2024-10-07 198/week @ 2024-10-14 413/week @ 2024-10-21 435/week @ 2024-10-28 401/week @ 2024-11-04 318/week @ 2024-11-11 371/week @ 2024-11-18 450/week @ 2024-11-25 542/week @ 2024-12-02 295/week @ 2024-12-09 354/week @ 2024-12-16

1,657 downloads per month
Used in 3 crates

Unlicense

9KB
146 lines

Liveterm

Print stuff to the terminal, remove it, repeat!

Here's how to use it:

let mut tp = TermPrinter::new(std::io::stdout());
for i in 0..10 {
    tp.clear()?;              // clear what we draw last time
    tp.buf.clear();           // clear the buffer
    write!(tp.buf, "{}", i)?; // fill the buffer
    tp.print()?;              // draw the buffer
}

lib.rs:

Print stuff to the terminal, remove it, repeat!

Here's how to use it:

use liveterm::TermPrinter;
use std::fmt::Write;
let mut tp = TermPrinter::new(std::io::stdout());
for i in 0..10 {
tp.clear()?;              // clear what we draw last time
tp.buf.clear();           // clear the buffer
write!(tp.buf, "{}", i)?; // fill the buffer
tp.print()?;              // draw the buffer
}

Dependencies

~3.5MB
~60K SLoC