@unified-product-graph/cli · v0.22.2
The upg command line
Scaffold, inspect, edit, validate and sync product graphs straight from the terminal and gate CI on graph health. 47 commands, zero config, reads and writes the same .upg files as the SDK and MCP server.
Install
Or run it without installing: npx @unified-product-graph/cli <command>.
60-second quick start
# Scaffold a graph (interactive, or pass --title to script it)
upg init
# Score its health, 0-100
upg health
# Validate structure (exits non-zero on violations, great in CI)
upg verifyEvery command takes --help. Most reads support --json for scripting.
Run it with your AI
Gate CI on graph health
The CLI exits non-zero on policy violations, so it drops straight into CI. Rather than hand-writing the workflow, paste this into an AI assistant and it reads the exit-code contract and generates the job for any CI.
Add a Unified Product Graph health gate to my CI. Read https://unifiedproductgraph.org/cli/reference for the command list and the exit-code contract, then detect which CI I use (GitHub Actions, GitLab CI, and so on) and write a job that installs the CLI (npm install -g @unified-product-graph/cli) and runs `upg verify` and `upg health --min-score` on every pull request, failing the build on real policy violations but not on transient errors. Show me the workflow file and where to put it.47 commands
Stand in the graph · 9
Move by cursor + lens; create where you stand.
use · here · at · ls · find · new · link · check · fix
Read · 11
Inspect and score the graph (read-only).
health · verify · diff · list · tree · search · query · spec · template · context · log
Create & edit · 9
Add and change nodes and edges.
create · update · delete · connect · gaps · move · disconnect · dedupe · batch
Frameworks · 4
Run a framework over entities, record scores, read them back.
apply · score · show · prioritise
Graph · 12
Scaffold, scope, import and export graphs.
init · workspace · import · export · fmt · migrate · registry · portfolio · area · clone · product · sync
Setup · 2
Wire the CLI + MCP server into your tools.
install-skills · mcp
Go deeper