Skip to content
UPG is in early alpha. The specification is still evolving and may change between versions.

CLI · Reference

Command reference

47 commands. Run any of them with upg <command> --help for the same options shown here. --help is intercepted before any command runs, so asking for help never triggers a side effect (no delete picker, no skill install).

Exit codes

Every command shares one exit contract. Gate CI on it: a violation is exit 2, distinct from a runtime error.

0
Success
1
Runtime error (bad value, I/O, unknown type)
2
Validation or policy violation (e.g. verify / check found a problem)
3
Usage error (missing arg, no TTY for an interactive picker)

Stand in the graph

Navigate by cursor and lens: move, look around, create where you stand.

Read

Inspect and score the graph. Safe, read-only.

upg health

Score the graph 0–100. Gate CI with --min-score.

upg verify

Structural validation. Exits 2 on violations for CI gates.

upg diff

Compare the current .upg against a git ref. For PR reviews.

upg list

Query entities from the graph.

upg tree

Tree view of the graph. Filter by entity type or domain.

upg search

Fuzzy text search across titles and descriptions.

upg query

Traverse the graph following typed edges, with field projection and truncation. The BFS primitive behind tree views.

upg spec

Browse the UPG spec catalogue offline. No graph needed.

upg template

Browse the curated starter templates (the library /upg-new-from-template and the site gallery use).

upg context

A lens-aware product summary: counts, key entities, and domain guidance.

upg log

The recent mutation feed for the graph (create / update / delete).

Create & edit

Mutate the graph: nodes, edges, and gap-driven scaffolding.

Frameworks

Run a framework over entities and record the scores on the exercise, then read them back.

Graph

Create, scope, and move whole graphs in and out of the .upg format.

upg init

Create a .upg file. Interactive by default.

upg workspace

Workspace actions: list (default), switch <name>, rekind --kind <kind> <file...>.

upg import

Import product knowledge from Markdown, Notion, Linear, Vistaly, Dovetail, or GitHub.

upg export

Export entities as JSON, Markdown, or CSV.

upg fmt

Rewrite .upg files to canonical form (byte-stable, diff-friendly).

upg migrate

Catalogue-aware migrations: retype a node (applies spec defaults), migrate statuses/properties to current, or rename an edge type. Pairs with fmt and fix.

upg registry

The canonical-entity registry: shared entities many products instance. Operates on a portfolio graph (default portfolio.upg).

upg portfolio

Cross-product and portfolio operations: membership, cross-product edges, classification cells, a portfolio digest, and validation including portfolio anti-patterns.

upg area

Product areas within a portfolio: the area hierarchy, area-scoped subgraphs, product membership, and audience links.

upg clone

Scaffold a structure from a template product, optionally scoped to a region.

upg product

Edit product-level fields (title, description, stage, member_kind).

upg sync

Report local sync state vs the cloud (read-only; push/pull stay agent-only).

Setup

Wire the CLI and MCP server into your environment.