@osirisjson/cli
v0.1.0
Published
OSIRIS JSON Toolbox - Command Line Interface for validation and other utilities
Maintainers
Readme
@osirisjson/cli
Command-line interface for validating OSIRIS JSON documents.
Part of the osiris-toolbox monorepo.
Installation
npm install -g @osirisjson/cliUsage
# Validate a single file
osirisjson validate topology.json
# Validate all JSON files in a directory
osirisjson validate ./exports/
# Validate from stdin
cat doc.json | osirisjson validate -
# Strict profile with JSON output
osirisjson validate --profile strict --format json topology.jsonFlags
| Flag | Description | Default |
|-----------------------|--------------------------------------------------|------------|
| --profile <level> | Validation profile: basic, default, strict | default |
| --format <fmt> | Output format: text, json, ndjson | text |
| --schema <key> | Override schema version to validate against | auto-detect|
| --color | Force color output | auto |
| --verbose | Show passing documents in output | off |
| --help | Show help | |
| --version | Show version | |
Exit codes
| Code | Meaning |
|------|----------------------------------------------|
| 0 | Success - all documents valid |
| 1 | Validation error - one or more documents invalid |
| 2 | Operational error - bad arguments, file not found, etc. |
Documentation
Full documentation at osirisjson.org/en/docs/validate/validate.
Requirements
- Node.js >= 20.0.0
