Skip to content

Install the Polygraph CLI

The Polygraph CLI ships as a standalone binary for macOS and Linux. Neither Node.js nor npm is required to run it.

Terminal window
curl -fsSL https://app.trypolygraph.com/install.sh | sh

The 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.

Terminal window
brew install nrwl/tap/polygraph

The formula downloads the same standalone binary the script does.

Windows has no standalone binary yet. Run the PowerShell installer:

Terminal window
irm https://app.trypolygraph.com/install.ps1 | iex

The 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:

Terminal window
npm install -g polygraph

Rerun the install command to move to the current release:

Terminal window
curl -fsSL https://app.trypolygraph.com/install.sh | sh

If you installed with Homebrew, upgrade through brew instead:

Terminal window
brew upgrade polygraph

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:

Terminal window
export PATH="$HOME/.local/bin:$PATH"

The script installs to ~/.polygraph. Set POLYGRAPH_INSTALL_DIR to relocate the install root:

Terminal window
curl -fsSL https://app.trypolygraph.com/install.sh | POLYGRAPH_INSTALL_DIR=/opt/polygraph sh