Skip to main content

Installation

Mercury runs anywhere Node.js 20+ runs, plus everywhere a single binary can live — including phones via Termux.

Pick your platform

  • macOScurl | sh installer, Homebrew-style PATH setup, Apple Silicon & Intel binaries.
  • Linux — works on any glibc distro; static x64/arm64 binaries.
  • Windows — PowerShell installer, native .exe, optional WSL path.
  • Termux & lightweight devices — Android (Termux), iSH, Alpine containers, Raspberry Pi.

Two install paths

Every platform supports two routes — pick whichever fits.

1. Standalone binary (no Node.js required)

A one-line installer downloads the latest pre-built binary, verifies its SHA-256, and puts it on your PATH.

# macOS / Linux
curl -fsSL https://mercuryagent.sh/install.sh | sh
# Windows
irm https://mercuryagent.sh/install.ps1 | iex

The installer:

  • Detects your OS and CPU architecture (macOS arm64/x64, Linux x64/arm64, Windows x64).
  • Resolves the latest GitHub release.
  • Verifies the SHA-256 checksum against checksums.txt.
  • Installs to ~/.mercury/bin/mercury (or %USERPROFILE%\.mercury\bin\mercury.exe) and updates your shell PATH.

Environment variables

VariableDefaultPurpose
MERCURY_VERSIONlatestPin to a specific version, e.g. MERCURY_VERSION=1.1.9
MERCURY_INSTALL$HOME/.mercuryInstall prefix (binary lands at $MERCURY_INSTALL/bin/mercury)
MERCURY_NO_PATH(unset)Set to 1 to skip modifying your shell rc / user PATH

2. npm package (requires Node.js 20+)

If you already have Node.js, the npm route is the simplest:

npm i -g @cosmicstack/mercury-agent

Other package managers:

bun add -g @cosmicstack/mercury-agent
pnpm add -g @cosmicstack/mercury-agent
yarn global add @cosmicstack/mercury-agent

Or run without installing:

npx @cosmicstack/mercury-agent

Upgrade

Mercury includes a built-in upgrade command for npm installs:

mercury upgrade

It stops the daemon if running, removes the old package to avoid ENOTEMPTY, installs the latest version, and reports the version diff.

Binary installs

mercury upgrade is npm-aware. If you installed via the shell installer, re-run it to get the latest binary:

curl -fsSL https://mercuryagent.sh/install.sh | sh

Enable the web dashboard

After installation, run the doctor or edit your config:

mercury doctor
# ~/.mercury/mercury.yaml
web:
enabled: true

The dashboard will be available at http://127.0.0.1:6174 when Mercury is running.