SpecForge
FORMAT
v1.0

Validator CLI

Standalone offline validator for the SpecForge Format. Supports JSON, YAML, and TOON. Zero SaaS dependency. Zero auth required.

terminal
# Install globally
$ npm install -g @specforge/validator
# Validate a JSON spec
$ specforge-validate ./my-spec.sf.json
✓ Valid SpecForge spec (v1.0) — json
# Validate a TOON spec
$ specforge-validate ./my-spec.sf.toon
✓ Valid SpecForge spec (v1.0) — toon
# Invalid spec — get specific errors
$ specforge-validate ./broken.sf.json
✗ Invalid SpecForge spec:
- Missing required field: project.id
- specifications[0].status must be one of: draft, planning, ...
Programmatic Usage
import
{ validate, toJson }
from '@specforge/validator'
// 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 .sf.json, .sf.yaml, and .sf.toon files.
Specific errors
Points to exact field and provides clear error messages.
Programmatic API
Import validate() and toJson() in your own tools.