Skip to content

Install

  • Node 22.23.4+, 24.22.1+, or 26.12.1+ on a supported line or Bun 1.4.4+: either runtime works
  • A POSIX shell (Linux, macOS, or WSL)

Choose Node 24.22.1+ for a new installation. Source development, dashboard and docs tooling use that floor; the repository .nvmrc selects 24.22.1. The published CLI still accepts patched Node 22. Its upstream support ends April 30, 2027, so move existing Node 22 installations to Node 24 before then. Removing Node 22 from the npm engine range will ship as a breaking minor release with migration notes.

The published npm package ships a prebuilt dist/, so it runs on plain Node out of the box, no Bun required. Installing Bun is optional but recommended for developing Harnery: Bun runs the TypeScript source directly (zero build step), so edits are live. The package’s exports resolve to TS source under Bun and to the built dist/ everywhere else, so the two stay in lockstep.

One line, no clone needed:

Terminal window
curl -fsSL https://harnery.com/install.sh | bash

It installs the harn CLI globally with a package manager you already have (npm preferred for a predictable global bin, Bun otherwise), checks that bin dir is on your PATH, verifies harn --version, and points you at harn init. It’s non-interactive and idempotent, so it’s safe to pipe and safe to re-run.

Prefer to drive your package manager yourself? Same result:

Terminal window
npm install -g harnery

Pass flags to the one-liner through bash -s --:

Terminal window
curl -fsSL https://harnery.com/install.sh | bash -s -- --method bun --version 0.3.2

--version (or HARNERY_VERSION) pins a version, --method npm|bun forces a package manager, and --install-runtime installs Bun when neither Bun nor Node is present (without it, the installer prints how to get a runtime and exits). It’s served straight from the docs site, so you can read it before running: harnery.com/install.sh.

npm install harnery (what the one-liner runs) ships the CLI + coord engine (bin, dist, src, schemas): everything you need to wire hooks with harn init and run the coord layer. It does not include the web/ dashboard or this docs/ site; those are heavy app/build trees that live in the git repo only.

To run the dashboard (harn web up) or hack on Harnery itself, clone the repo (next section).

From a git clone (contributing or the dashboard)

Section titled “From a git clone (contributing or the dashboard)”

Cloned the repo? One script turns it into a harnery-ready checkout: it installs deps, builds the Node dist/ (skipped when Bun is present), runs harn init to wire your project, and links the bins onto your PATH:

Terminal window
./scripts/setup.sh

Run it from the repo root. It auto-detects the project to wire (git toplevel of the CWD, else Harnery’s parent directory), and it’s idempotent. Flags: --project-root <dir>, --link-dir <dir> (default ~/.local/bin), --no-link, --adapter <id>. Reverse it with the mirror, ./scripts/teardown.sh (see Uninstall).

Terminal window
harn doctor

This verifies the runtime + dependencies Harnery expects (Node version, optional Python, optional restic for backup, etc.). It exits 0 if everything’s wired and prints OS-specific install instructions for anything missing.

Terminal window
harn init

Run once per adapter to create the .harnery/ coord root and wire that adapter’s hooks. Pass --adapter claude-code (default), cursor, codex, or opencode; run it once per adapter when a project uses several. It is idempotent and preserves non-Harnery hooks. OpenCode has no hook file, so --adapter opencode installs a Harnery plugin under .opencode/plugins/harnery/ instead. See harn init for --dry-run and details.

Two layers, mirroring install. Unwire a project with harn deinit (on a terminal it asks before deleting .harnery/; keeps it by default). Remove the CLI with the hosted one-liner:

Terminal window
harn deinit # unwire a project (keeps .harnery/)
curl -fsSL https://harnery.com/uninstall.sh | bash # remove the CLI itself

From a clone, ./scripts/teardown.sh runs harn deinit, removes the PATH symlinks, and (on a terminal) asks whether to also delete this project’s .harnery/ history and the clone itself (both default to no). Pre-answer for unattended runs with --purge-state and --remove-clone; it also takes --link-dir, --keep-links, --project-root, --adapter, and --dry-run. See harn deinit for the surgical, hook-preserving details.