Let other tools ask the CLI which version is installed and whether there's an update
Tools that build on OpenSpec (editor extensions, GUIs, scripts) want to show which OpenSpec you have and whether there's a newer one. Right now they can only run openspec --version and get a bare number back.
The CLI already knows much more. openspec update checks the registry for the newest release, works out how you installed OpenSpec (npm, pnpm, bun, Volta…) and prints the right update command. But that only happens inside openspec update, in a project, as coloured text. There's no way to just ask for it.
It'd be great to have a small openspec version command that reports this, with --json for tools. It's mostly plumbing around src/core/version-check.ts.
Today
$ openspec --version
1.12.0
$ openspec --version --json
1.12.0 (--json is ignored)
$ openspec version --json
error: unknown command 'version'What we'd like (same install: 1.12.0 via npm, 1.13.2 is out)
What's installed. Local and instant, never touches the network:
$ openspec version --json
{
"schemaVersion": 1,
"version": "1.12.0",
"install": {
"location": "/opt/homebrew/lib/node_modules/@fission-ai/openspec",
"packageManager": "npm",
"scope": "global"
}
}Only with --check, also ask the registry whether there's something newer:
$ openspec version --check --json
{
"schemaVersion": 1,
"version": "1.12.0",
"install": { …same as above… },
"update": {
"status": "available",
"latest": "1.13.2",
"command": "npm install -g @fission-ai/openspec@latest",
"canSelfUpgrade": true
}
}And the same without --json, for people:
$ openspec version --check
OpenSpec 1.12.0 (npm, global)
Update available: 1.13.2
npm install -g @fission-ai/openspec@latestA few details
--checkshould respect the existing opt-outs (telemetry off,DO_NOT_TRACK,OPENSPEC_NO_UPDATE_CHECK). If someone has opted out, don't call the registry; return"status": "disabled"and"latest": null. If the registry can't be reached,"status": "offline". Either way exit 0; it isn't an error.scopeis one ofglobal,project,temporary(npx and friends) orsource(a checkout). The existing helpers already tell these apart.- Please keep
openspec --versionexactly as it is; scripts rely on it.
Not part of this: upgrading from this command (openspec update keeps its upgrade offer), release notes, and update channels.
Source: Fission-AI/OpenSpec