Overview
@disclosureos/cli — scaffold, validate, and inspect observations from the command line
@disclosureos/cli is the developer tool for the ecosystem. It's not a library — it wraps the foundation packages so you can work with observations from a terminal: generate templates, validate files, and browse the registries without writing code.
Run it
No install required:
npx @disclosureos/cli --helpOr add it to a project:
npm install -D @disclosureos/cliOnce installed, the binary is disclosureos.
Commands
| Command | Does |
|---|---|
scaffold | Generate typed templates — observations, assessment maps, classifications |
validate | Validate observation JSON files: core + slots + evidence-ref warnings |
completeness | Measure how fully observations populate the schema — percentage, required coverage, missing fields |
registry | Introspect the field, observable, and origin registries |
info | Quick reference for types, observables, and OCS nodes |
disclosureos scaffold observation --full
disclosureos validate ./data/ --recursive
disclosureos completeness ./out/ --recursive
disclosureos registry origins --id 1.1.3
disclosureos info observable TO-3Never drifts from the libraries
The CLI doesn't re-implement any checks. validate delegates to parseEnrichedObservation from @disclosureos/schema — the exact validation pipeline library consumers use — then layers on CLI-only niceties like dangling-evidence-reference warnings. registry and info read the same exported constants and taxonomies the packages ship. What the CLI tells you is what the code will do.
A typical loop
# 1. Start from a template
disclosureos scaffold observation --out sighting.json
# 2. Fill it in (look things up as you go)
disclosureos registry observables
disclosureos info origin 1.1.1
# 3. Validate — repeat until clean
disclosureos validate sighting.json --strictFor programmatic use, do the same things with the libraries — see the golden path.
Migrating a dataset
When converting an existing catalog to observations, the CLI provides two key commands:
# Validate the output
disclosureos validate ./out/ --recursive --json
# Measure what's missing
disclosureos completeness ./out/ --recursive --jsonBoth accept --json for structured output in CI and scripts. See the onboarding workspace for the full guided workflow.