Skip to main content

Crate pulsebar

Crate pulsebar 

Source
Expand description

§Pulsebar

Elegant progress bars, spinners, and task tracking for Rust terminal applications.

Pulsebar provides a minimal, ergonomic API for adding progress reporting to CLI tools. It focuses on beautiful defaults, stable rendering, and predictable behavior.

§Quick Start

§Progress Bar

use pulsebar::ProgressBar;

let bar = ProgressBar::new(100).with_message("Downloading");
for _ in 0..100 {
    bar.advance(1);
    std::thread::sleep(std::time::Duration::from_millis(20));
}
bar.finish_success("Download complete");

§Spinner

use pulsebar::Spinner;

let spinner = Spinner::new().with_message("Connecting");
std::thread::sleep(std::time::Duration::from_secs(2));
spinner.finish_success("Connected");

§Multiple Tasks

use pulsebar::MultiProgress;

let multi = MultiProgress::new();
let build = multi.add_bar(100).with_message("Compile");
let tests = multi.add_bar(200).with_message("Run tests");

build.advance(10);
tests.advance(50);

build.finish_success("Compile finished");
tests.finish_success("Tests passed");

§Color Themes

use pulsebar::{ProgressBar, Theme};

let bar = ProgressBar::new(100)
    .with_message("Building")
    .with_theme(Theme::Default);

§Custom Format

use pulsebar::ProgressBar;

let bar = ProgressBar::new(1000)
    .with_message("Sync")
    .with_format("{msg} [{bar:30}] {pos}/{total} {rate}/s ETA {eta}");

Structs§

MultiProgress
Manages multiple concurrent progress bars and spinners with stable rendering.
ProgressBar
A progress bar that tracks completion of a task.
Spinner
An animated spinner for indeterminate tasks.

Enums§

Style
Visual style presets for progress bars and spinners.
Theme
Color theme presets for terminal output.