CLI Reference

Complete command-line interface documentation.

Installation

npm install -g @mackan_eu/json-toolbox

Verify installation:

json-toolbox version
# json-toolbox v2.3.0-final

Commands

CommandDescription
run <manifest>Run a pipeline manifest
exec <operator>Execute a single operator
validate <manifest>Validate a pipeline manifest
describe <operator>Show operator details
list-operatorsList all operators
versionShow version
helpShow help

Examples

Format JSON

echo '{"a":1,"b":2}' | json-toolbox exec json.format

CSV to JSON

cat data.csv | json-toolbox exec csv.parse --header true

Filter Array

cat data.json | json-toolbox exec transform.filter --key status --operator eq --value active

Run Pipeline

json-toolbox run pipeline.json < input.json > output.json

Streaming Mode

json-toolbox exec transform.filter --key level --operator eq --value error \
  --stream --progress < huge.ndjson

Global Flags

FlagDescription
-i, --input <file>Input file (default: stdin)
-o, --output <file>Output file (default: stdout)
--minifyMinify output
--strictError on unknown parameters
--streamEnable streaming mode (NDJSON)
--progressShow progress in streaming mode
--chunk <n>Chunk size for streaming (default: 1000)
--jsonJSON output format

Exit Codes

CodeMeaning
0Success
1General error
2Invalid manifest
3Invalid input
10Unknown operator
11Unknown parameter (strict mode)