CLI Reference
Complete command reference for the orp command-line tool.
Installation
pip install orp-validator
orp --version # Verify installationCommands
orp new
Create a new ORP document with interactive prompts or flags.
# Interactive mode
orp new my-document.yaml
# Non-interactive mode
orp new doc.yaml --title "My Policy" --domain policy --author "Name" \
--compliance basic --non-interactiveOptions:
--title TEXT- Document title--domain [policy|research|business]- Document domain--author TEXT- Author name--compliance [basic|standard|full]- Compliance level--format [yaml|json]- Output format (default: yaml)--non-interactive- Skip prompts, use flags only--quiet- Suppress output except errors
orp validate
Validate document against ORP JSON Schema.
orp validate my-document.yaml
orp validate doc.json --verbose
orp validate doc.yaml --json # Machine-readable outputOptions:
--verbose- Show detailed validation report--json- Output JSON format for automation
Exit Codes:
0- Valid document1- Invalid document2- File not found or parse error
orp check
Quick compliance level check without full validation.
orp check my-document.yaml
orp check doc.yaml --jsonFaster than validate for checking which layers are present.
Options:
--json- Machine-readable output--quiet- Only output compliance level
Exit Codes:
0- ORP-Full1- ORP-Standard2- ORP-Basic3- Non-compliant4- Error
orp diff
Compare two ORP documents.
orp diff original.yaml modified.yaml
orp diff doc1.yaml doc2.yaml --filter-metadata
orp diff doc1.yaml doc2.yaml --jsonOptions:
--filter-metadata- Excludelast_modifiedandcreatedfrom comparison--json- Machine-readable output
Output:
- Lists all differences with field paths
- Detects fork relationships
- Shows added, removed, and changed fields
Examples
Create and validate
# Create Basic document
orp new policy.yaml --compliance basic --title "Education Funding" \
--domain policy --author "Jane Doe" --non-interactive
# Validate it
orp validate policy.yaml
# Check compliance
orp check policy.yamlCompare documents
# Create two versions
orp new v1.yaml --title "Version 1" --non-interactive
orp new v2.yaml --title "Version 2" --non-interactive
# Compare them
orp diff v1.yaml v2.yamlSee Quick Start Guide for more examples.