Static restic 0.19.1 binary as an npm package. The package is only a few KB; the binary is downloaded from GitHub Releases at install time because the upstream static-build sites are unreliable to depend on directly. This is the same install-time-download model as @hoardodile/7z-bin, @hoardodile/ffmpeg-bin and ffmpeg-static.
| Platform | Binary |
|---|---|
| win32-x64 | restic.exe |
| darwin-x64 | restic |
| darwin-arm64 | restic |
| linux-x64 | restic |
| linux-arm64 | restic |
The binaries are statically linked builds from the official restic release (restic/restic), version-pinned and SHA-256 verified against the repo's upstream SHA256SUMS.
The release assets are the raw, uncompressed binaries (the size on the release page is the real on-disk size — no tar/gz wrapper).
Unsupported platforms (win32-ia32, win32-arm64, linux-ia32, linux-arm) resolve to null; consumers should degrade to a PATH restic.
const restic = require("@hoardodile/restic-bin") // path or nullRESTIC_BIN_PATH— overrides the returned path.RESTIC_BINARIES_URL— overrides the download base URL.- Install verifies SHA-256 (
assets.json) and requires restic0.19(major.minor) in therestic versionoutput.
Skip bundling binaries: let your app download them from the release on demand, verify, and chmod:
https://github.com/hoardodile/restic-bin/releases/download/v<version>/restic-<platform>-<arch>
- No authentication required; the asset is the raw
resticbinary (orrestic.exeon Windows). - Checksums:
assets.jsonin the package, orSHA256SUMS.txton the release. Verify the SHA-256, thenchmod +xon macOS/Linux.
assets.json ships with empty sha256 placeholders until the assets are first built — the script records the real SHA-256 of each repacked artifact.
- Update
VERSION(and per-platform filenames, if the upstream naming changed) inscripts/build-assets.mjs - Bump
package.jsonversion (defines the release tag) - Run
npm run build:assets(idempotent;--skip-uploadbuilds locally only and writes the realassets.json) - Commit (at minimum
assets.json+ the version), push, then push thev<version>tag. The tag triggers the release workflow: assets are built/uploaded to the GitHub release and the package is published to npm automatically (Trusted Publishing / OIDC — no registry token in Actions).
One-time npm-side setup (per package, npm >= 11.11, owner account, asks for a 2FA code once):
npm trust github @hoardodile/restic-bin --file release.yml --repo hoardodile/restic-bin --allow-publish
Note: the main-branch CI run for the bump commit can transiently fail its install/verify jobs while the tag-triggered release workflow is still uploading assets (404 on the v<version> download URL) — rerun the failed jobs once the release workflow finished:
gh run rerun --repo hoardodile/restic-bin --failed <run-id>
BSD-2-Clause (scripts). The restic binary is copyright its author and licensed BSD-2-Clause; it is not shipped in the package — consult the upstream license. Attribution is recorded by scripts/build-assets.mjs and the release notes.