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
| Feature | Description |
|---|---|
| Multi-provider | GitHub, GitLab, Codeberg, self-hosted |
| Auto-update | Download and install updates automatically |
| Custom messages | Control all displayed messages |
| Custom versioning | 0.01.1-release, CalVer, and more |
| Background checking | Non-blocking update checks |
| Build-time checking | Check during zig build |
| Global opt-out | ZIG_UPDATE_CHECK_DISABLE environment variable |
| CI detection | Automatically disabled in CI |
Next Steps
- Installation - Install updater.zig in your project
- Quick Start - Basic usage examples
- Configuration - Full configuration reference