#command-line-tool #board #status #cli #jobs

cli-status-board

Simple and thread-safe CLI visualization of async jobs

3 releases

Uses new Rust 2024

new 0.2.2 Apr 12, 2025
0.2.1 Apr 11, 2025
0.2.0 Apr 11, 2025

#28 in #board

Download history 48/week @ 2025-04-05

62 downloads per month

MIT license

120KB
595 lines

CLI Status Board

Quickly visualize ongoing asynchronous tasks on the command line.

demo

Usage

use cli_status_board::{SBStateConfig, SBState, Status};

fn main() {
    let state = SBState::new(SBStateConfig {
        silent: false,
        ..Default::default()
    });

    // Add some arbitrary task with an initial status.
    let task_id = state.add_task(format!("Some super basic task"), Status::Queued);

    // Update the task's status.
    state.update_task(&task_id, Status::Started);

    // TaskId does reference counting so that when the last one drops
    // the task completes automatically. Or you can do so explicitly:
    state.update_task(&task_id, Status::Finished);
}

Examples

See the examples directory. The demo example can be run with:

cargo run --example demo

Dependencies

~0.2–6.5MB
~38K SLoC