Skip to content

loaders.zigTerminal Loading Indicators for Zig

High-performance, thread-safe progress bars, spinners, and multi-progress UIs for Zig CLI applications. Zero external dependencies. Cross-platform.

loaders.zig terminal loading indicators preview

Quick Install

Stable release (production):

bash
zig fetch --save https://github.com/muhammad-fiaz/loaders.zig/archive/refs/tags/0.0.1.tar.gz

Nightly (latest main):

bash
zig fetch --save git+https://github.com/muhammad-fiaz/loaders.zig.git

Quick Example

zig
const std = @import("std");
const loaders = @import("loaders");

pub fn main(init: std.process.Init) !void {
    const io = init.io;

    var bar = loaders.Bar.init(io, .{
        .label = "Processing",
        .total = 100,
        .show_percent = true,
        .show_elapsed = true,
    });
    defer bar.done();

    for (0..100) |i| {
        bar.setCompleted(i + 1);
        bar.render();
        try io.sleep(std.Io.Duration.fromMilliseconds(30), .awake);
    }
}

Released under the MIT License.