Crates.io | cli-status-board |
lib.rs | cli-status-board |
version | 0.2.3 |
created_at | 2025-04-11 22:52:28.381314+00 |
updated_at | 2025-08-13 16:35:23.199053+00 |
description | Simple and thread-safe CLI visualization of async jobs |
homepage | https://github.com/loremdipso/cli-status-board |
repository | |
max_upload_size | |
id | 1630443 |
size | 228,331 |
Quickly visualize ongoing asynchronous tasks on the command line.
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);
}
See the examples directory. The demo example can be run with:
cargo run --example demo