Skip to content

Getting Started

updater.zig is a production-grade update checker and auto-updater for Zig applications.

Why updater.zig?

  • Zero Dependencies: Pure Zig implementation with no external runtime dependencies
  • Multi-Provider Support: GitHub, GitLab, Codeberg, and custom/self-hosted providers
  • Flexible Versioning: Semantic, custom formats (0.01.1-release), date-based, and numeric
  • Auto-Update: Download and install updates automatically with configurable workflows
  • Custom Messages: Full control over what messages are displayed and when
  • Privacy First: Global opt-out, CI detection, and no surprise networking

System Requirements

  • Zig: 0.15.0 or later
  • Network: Access required only when checking is enabled

Quick Example

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

pub fn main() !void {
    var gpa = std.heap.GeneralPurposeAllocator(.{}){};
    defer _ = gpa.deinit();
    const allocator = gpa.allocator();

    const result = try updater.checkGitHub(
        allocator,
        "muhammad-fiaz",
        "updater.zig",
        "0.0.1",
    );

    if (result.has_update) {
        std.debug.print("Update available: {s}\n", .{result.latest_version.?});
    }
}

Features

FeatureDescription
Multi-providerGitHub, GitLab, Codeberg, self-hosted
Auto-updateDownload and install updates automatically
Custom messagesControl all displayed messages
Custom versioning0.01.1-release, CalVer, and more
Background checkingNon-blocking update checks
Build-time checkingCheck during zig build
Global opt-outZIG_UPDATE_CHECK_DISABLE environment variable
CI detectionAutomatically disabled in CI

Next Steps

Released under the MIT License.