The Polygraph CLI needs Node.js 22.13.0 or newer (npm 10 or newer ships with it). The installer checks for it and stops with the fix command if it is missing. It writes under the install root, symlinks the polygraph binary into ~/.local/bin (the standard user bin directory, overridable with XDG_BIN_HOME), updates a single shell profile to put it on your PATH, and never asks for sudo.
macOS and Linux
Section titled “macOS and Linux”curl -fsSL https://app.trypolygraph.com/install.sh | shThis installs polygraph to ~/.polygraph, adds it to your PATH, and prints the command to run. Because it also links the CLI into ~/.local/bin, polygraph resolves from tools that don't load your shell config (Node-based tooling, editor and MCP integrations, and fish shells) as long as ~/.local/bin is on your PATH — it is by default on most Linux setups, and on macOS the installer's shell-profile edit adds it.
Windows
Section titled “Windows”Run in PowerShell:
irm https://app.trypolygraph.com/install.ps1 | iexThis installs polygraph to %USERPROFILE%\.polygraph, adds it to your user PATH, and prints the command to run.
Homebrew (macOS)
Section titled “Homebrew (macOS)”brew install nrwl/tap/polygraphnpm (any platform)
Section titled “npm (any platform)”npm install -g polygraphNode.js 22.13.0 or newer is required for every method.
Install options
Section titled “Install options”The curl and irm installers install to ~/.polygraph (%USERPROFILE%\.polygraph on Windows), add that directory to your PATH, and print the command to run. They write under the install root and update a single shell profile (your user PATH on Windows), and never use sudo. On macOS and Linux the installer also symlinks the polygraph binary into ~/.local/bin (overridable with XDG_BIN_HOME), so it is discoverable from tools that don't load your shell config.
Install somewhere else. Set POLYGRAPH_INSTALL_DIR:
curl -fsSL https://app.trypolygraph.com/install.sh | POLYGRAPH_INSTALL_DIR=/opt/polygraph sh$env:POLYGRAPH_INSTALL_DIR="C:\tools\polygraph"; irm https://app.trypolygraph.com/install.ps1 | iexLeave your PATH alone. Set POLYGRAPH_NO_MODIFY_PATH to any value. The installer skips the PATH edit and prints the line to add the directory yourself:
curl -fsSL https://app.trypolygraph.com/install.sh | POLYGRAPH_NO_MODIFY_PATH=1 sh$env:POLYGRAPH_NO_MODIFY_PATH="1"; irm https://app.trypolygraph.com/install.ps1 | iex