Validator CLI
Standalone offline validator for the OpenSpec. Supports JSON, YAML, and TOON. Zero SaaS dependency. Zero auth required.
This validates the shape of a spec. To check whether a spec is ready to build, use crucible — a deterministic readiness engine (pip install crucible-forge) that scores a spec against a rubric and reports a pass/fail gate.
terminal
# Install globally
$ npm install -g @blacksmithers/openspec
# Validate a JSON spec
$ openspec ./my-spec.oschema.json
Valid OpenSpec (v1.1) — json
# Validate a TOON spec
$ openspec ./my-spec.oschema.toon
Valid OpenSpec (v1.1) — toon
# Invalid spec — get specific errors
$ openspec ./broken.oschema.json
Invalid OpenSpec:
- Missing required field: schemaVersion
- goals must contain at least 3 items
Programmatic Usage
import
{ validate, toJson }
from '@blacksmithers/openspec'
// Validate any format
const data = toJson(rawInput)
const result = validate(data)
if (result.valid) {
// Ship it
}
Features
Offline
No network calls. No SaaS dependency. Works anywhere.
Multi-format
Accepts .oschema.json, .oschema.yaml, and .oschema.toon files.
Specific errors
Points to exact field and provides clear error messages.
Programmatic API
Import validate() and toJson() in your own tools.