The Polygraph CLI ships as a standalone binary for macOS and Linux. Neither Node.js nor npm is required to run it.
Install on macOS and Linux
Section titled “Install on macOS and Linux”curl -fsSL https://app.trypolygraph.com/install.sh | shThe script downloads the binary for your platform, verifies its checksum, installs it under ~/.polygraph, and links polygraph into ~/.local/bin. It never asks for sudo.
Install with Homebrew
Section titled “Install with Homebrew”brew install nrwl/tap/polygraphThe formula downloads the same standalone binary the script does.
Install on Windows
Section titled “Install on Windows”Windows has no standalone binary yet. Run the PowerShell installer:
irm https://app.trypolygraph.com/install.ps1 | iexThe PowerShell installer uses npm under the hood, so Node.js 22.13.0 or newer is required on Windows (npm 10 or newer ships with it). To install by hand instead, run npm yourself:
npm install -g polygraphUpgrade the CLI
Section titled “Upgrade the CLI”Rerun the install command to move to the current release:
curl -fsSL https://app.trypolygraph.com/install.sh | shIf you installed with Homebrew, upgrade through brew instead:
brew upgrade polygraphPut the CLI on your PATH
Section titled “Put the CLI on your PATH”The script links polygraph into ~/.local/bin. Most setups already have that directory on the PATH. When it is missing, the script prints the line to add to your shell profile:
export PATH="$HOME/.local/bin:$PATH"Install somewhere else
Section titled “Install somewhere else”The script installs to ~/.polygraph. Set POLYGRAPH_INSTALL_DIR to relocate the install root:
curl -fsSL https://app.trypolygraph.com/install.sh | POLYGRAPH_INSTALL_DIR=/opt/polygraph sh