Install
snapdir ships as a single static binary named snapdir with zero runtime
dependencies — all hashing and storage happen in-process, so there is nothing to
install alongside it. Pick whichever route fits your environment; both give you
the same snapdir command.
Install with cargo
If you have a Rust toolchain (1.91.1 or newer), install snapdir from crates.io:
cargo install snapdir
This compiles and places snapdir in ~/.cargo/bin. Make sure that directory is
on your PATH (the Rust installer normally adds it for you).
To upgrade later, re-run the same command with --force:
cargo install snapdir --force
Install a prebuilt release archive
Every tagged release publishes prebuilt, per-platform archives on GitHub — no Rust toolchain required. Grab the archive for your platform from the releases page:
Archives are named snapdir-<version>-<target>.tar.xz and each ships with a
matching .sha256 checksum file. Prebuilt targets:
The *-musl builds are fully static and link hermetically — handy for containers
and minimal or restricted environments.
Download, verify the checksum, unpack, and put the binary on your PATH. For
example, on Linux x86_64 with the static musl build:
version=1.9.0
target=x86_64-unknown-linux-musl
base="https://github.com/snapdir/snapdir/releases/download/v${version}"
# Download the archive and its checksum
curl -LO "${base}/snapdir-${version}-${target}.tar.xz"
curl -LO "${base}/snapdir-${version}-${target}.tar.xz.sha256"
# Verify integrity (exits non-zero on mismatch)
shasum -a 256 -c "snapdir-${version}-${target}.tar.xz.sha256"
# Unpack and install
tar -xJf "snapdir-${version}-${target}.tar.xz"
sudo install "snapdir-${version}-${target}/snapdir" /usr/local/bin/snapdir
Each archive also bundles the snapdir-ssh-store and snapdir-sftp-store
binariesLICENSE, CHANGELOG.md,
shell completions (completions/), and a man page (man/snapdir.1).
Optional: SSH and SFTP store binaries
To use the ssh:// and sftp:// stores,
the snapdir-ssh-store and snapdir-sftp-store binaries must also be on your
PATH. The prebuilt release archives already include both; with cargo, install
them from their own crate:
cargo install snapdir-ssh-store
They drive your system OpenSSH client (version 8.5 or newer required), so there
is nothing else to configure — your existing ~/.ssh/config, keys, and agent
keep working. If you only use the file:// and cloud stores, you can skip them.
Use snapdir as a library
snapdir is also available as a Rust crate if you want to embed snapshotting in your own program:
cargo add snapdir-core
Verify the install
Confirm the binary is on your PATH and prints its version:
snapdir version
You should see version 1.9.0. You can also run snapdir --help to list every
subcommand.
To generate shell completions from an installed binary, use
snapdir autocomplete:
eval "$(snapdir autocomplete zsh)"
Next steps
Head to the Quickstart for a 60-second, no-setup round-trip: snapshot a directory, push it to a local store, and pull it back byte-for-byte verified.