pch is Patch’s command-line tool. It covers the whole loop of making something for Patch, from writing patch.json to publishing a release, and it’s built to work just as well for coding agents and CI as for people.
It will be open source and published on npm as @patchgg/cli:
pch only uses the public API, so anything it does, your own tools can do too.
Commands
Agents and CI
- Set
PCH_TOKENto an API key and nothing else: no login, no prompts and no files written. - Every command takes
--jsonfor machine-readable output. - When its output isn’t a terminal,
pchnever prompts and prints plain progress lines.
MCP server
pch mcp runs an MCP server, so agents like Claude Code, Codex and Cursor can use Patch as tools: validating, checking and publishing releases, and running a dev build. It uses the same credentials as pch.