Install
Hunk runs on macOS, Linux, and Windows. The install script is the default method on macOS and Linux; npm or mise covers Windows. npm installs require Node.js 22 or newer, while the install script, Homebrew, mise, and Nix installs are self-contained binaries that do not require Node.js. Git is recommended for the most common review workflows.
Install script (default)
Section titled “Install script (default)”On macOS and Linux, the default install script downloads the prebuilt binary for your machine:
curl -fsSL https://hunk.dev/install.sh | shhunk --versionWhen the release publishes SHA256SUMS and your machine has sha256sum or shasum, the script verifies the downloaded archive before installing. Otherwise it warns that verification was skipped and continues. It installs into ~/.hunk (binary at ~/.hunk/bin/hunk, bundled agent skills beside it) and adds ~/.hunk/bin to PATH in your shell's startup file. Restart your shell afterwards.
The script accepts these settings:
| Setting | Effect |
|---|---|
HUNK_VERSION | Install an exact release instead of the newest one. Also accepted as a positional argument. |
HUNK_INSTALL_DIR | Install the binary into this directory instead of ~/.hunk/bin. |
--no-modify-path (or HUNK_NO_MODIFY_PATH=1) | Leave shell startup files alone. |
--force (or HUNK_ALLOW_CONFLICTING_INSTALLS=1) | Install despite another Hunk on PATH or in a known version-manager directory. |
HUNK_DISABLE_ANALYTICS=1 or DO_NOT_TRACK=1 | Keep release discovery direct to GitHub instead of using Hunk's aggregate release endpoint. |
By default, the installer refuses to create a second Hunk installation. It lists every competing
path it finds, its version and PATH precedence, and the command that removes it. Remove those
installs first; use --force only when you deliberately manage multiple copies.
curl -fsSL https://hunk.dev/install.sh | sh -s -- 0.19.0curl -fsSL https://hunk.dev/install.sh | sh -s -- --no-modify-pathcurl -fsSL https://hunk.dev/install.sh | sh -s -- --forcecurl -fsSL https://hunk.dev/install.sh | HUNK_VERSION=0.19.0 shOn Hunk 0.20 and newer, hunk update refreshes a default install in place. An install redirected with HUNK_INSTALL_DIR cannot be auto-detected later (the variable is gone once your shell exits), so update one of those by re-running the script with the same HUNK_INSTALL_DIR; the installer prints a reminder at the end of a custom-directory install.
Release discovery for curl-managed installs routes default install-script resolution, automatic startup update checks, hunk update --check, and hunk update through Hunk's release endpoint. Automatic checks normally run at most once every four hours for each user profile; simultaneous processes can produce an occasional duplicate, while explicit update commands and installer runs remain immediate. The endpoint records aggregate request source and current-version fields, but Hunk sends no installation ID, repository, hostname, cookie, or request body. HUNK_DISABLE_ANALYTICS=1 and DO_NOT_TRACK=1 keep release discovery direct to GitHub, and every endpoint failure falls back directly to GitHub.
Windows is not covered by the script; use npm or mise there.
Install the published hunkdiff package globally:
npm install --global hunkdiffhunk --versionThe package exposes both hunk and hunkdiff; the docs use hunk.
Homebrew
Section titled “Homebrew”brew install hunkhunk --versionIf you previously used the old modem-dev/tap formula, remove it before installing from Homebrew core:
brew uninstall modem-dev/tap/hunkbrew install hunkmise knows Hunk by the short name hunk (alias hunkdiff) and installs the prebuilt binary on macOS, Linux, and Windows:
mise use -g hunkhunk --versionOn Windows, use mise 2026.8.6 or newer; earlier releases fail with unsupported env: windows/amd64.
Hunk also ships as a default tool in Omarchy, which installs it through mise.
The repository exports a default package from flake.nix. From a clone of Hunk:
nix build./result/bin/hunk --versionSee the repository's nix/README.md for Home Manager and development-shell details.
Verify the install
Section titled “Verify the install”hunk --helpYou should see Usage: hunk <command> [options]. If the shell cannot find Hunk, ensure your global npm, Homebrew, mise, or ~/.hunk/bin directory is on PATH, then open a new shell.
Update Hunk
Section titled “Update Hunk”Starting with Hunk 0.20, hunk update is the canonical way to move npm, Homebrew, and default install-script installs to the newest release. It uses the package manager that installed Hunk:
hunk update # install the newest releasehunk update --check # check without installinghunk update 0.20.0 # install an exact npm or default install-script releaseOn an older Hunk release, update once with the installer or package manager that installed it; after that, use hunk update. npm installs (including bun and pnpm global installs), Homebrew installs, and default install-script installs update in place; an install-script update re-runs the installer with the target version and the same conditional checksum verification described above. mise, Nix, and local source builds remain owned by their own tooling, so use mise up hunk, your Nix configuration, or bun run install:bin instead. A custom HUNK_INSTALL_DIR also requires re-running the installer with the same directory, as described above. Pass --method npm, --method brew, or --method curl if Hunk detects the wrong method.