polygraph
v0.1.5
Published
CLI for the Polygraph meta-harness
Readme
Polygraph is the meta-harness that enables your agent to:
- Connect your repos and see the graph being created, providing your agent with valuable information about how repositories relate to each other.
- Implement cross-repo changes in one agent session. PRs are opened and traced automatically across the involved repositories.
- Automatically pull in external OSS dependencies to give your agent full context, so it isn't guessing an API from memory.
- Find out why code exists, tracing a commit back to the session and the reasoning that produced it.
- Don't start from scratch, but rather inherit context from past related agent sessions.
- Park work and pick it back up, or hand it to a teammate with the context intact.
- Get reviewed by an agent that did not write the code.
- Test an unpublished package change in its consumers, before it ships.
Polygraph wraps the agent you already use. It does not replace it.
Install
The macOS/Linux install script and Homebrew install a standalone executable. Node.js 22.13.0 or newer is required for npm and the current Windows installer.
macOS and Linux
curl -fsSL https://app.trypolygraph.com/install.sh | shWindows (PowerShell)
irm https://app.trypolygraph.com/install.ps1 | iexHomebrew (macOS)
brew install nrwl/tap/polygraphnpm (any platform)
npm install -g polygraphInstall location and PATH behavior are configurable. See Install the Polygraph CLI.
Run it
To get started, just run polygraph in your terminal and it'll guide you through the setup.
Update and diagnose
polygraph updatepolygraph upgrade is an alias. The command detects the running installation and updates it through Homebrew, npm, or the install script, preserving its installation location. Script installations use the selected Polygraph instance; pass --url to select another instance explicitly. If the installation cannot be identified confidently, the command prints manual recovery instructions without changing it.
The update command, --version / -v, and --help / -h (including command-specific help) remain available when the installed shell is too old to run session or agent commands. doctor --runtime / doctor --processes also remain available on shells that forward runtime diagnostics to the bundle. The oldest shells, including 0.1.0, handle all doctor invocations themselves and continue to return their existing bootstrap report.
Self-update also supports older npm and Homebrew shells, including 0.1.0, which do not provide invocation metadata. For these shells, the updater identifies the running Node script and verifies its owning npm prefix or Homebrew installation before making changes. Unrecognized installations and invalid invocation metadata produce an error with manual update instructions. These commands arrive through the normal bundle refresh. The shell must still be able to download and load the bundle; a broken download or bundle load may require a manual CLI update.
Credential waits
Commands wait up to 10 minutes when another process is accessing credentials. Set POLYGRAPH_CREDENTIAL_WAIT_TIMEOUT_MS to adjust the wait, for example POLYGRAPH_CREDENTIAL_WAIT_TIMEOUT_MS=120000 polygraph whoami for two minutes. This does not time out credential operations already in progress.
Learn more in the docs
- Quickstart: first session, end to end
- Agent plugin and skills: wire Polygraph into Claude Code, Codex, and friends
- Features: what the meta-harness actually does
- CLI reference and MCP tools
