26 Unix tools. One binary. Zero dependencies. · the missing coreutils for AI pipelines · vrk mcp - expose all 26 tools to any AI agent · brew install vrk - ready in 5 seconds · 26 Unix tools. One binary. Zero dependencies. · the missing coreutils for AI pipelines · vrk mcp - expose all 26 tools to any AI agent · brew install vrk - ready in 5 seconds

vrk validate

About

Checks every JSON record in a stream against a schema you provide. Valid records pass through to stdout. Invalid ones are dropped with a warning so downstream tools only see clean data. Use –strict to halt on the first bad record instead of skipping it.

The problem

You have a JSONL stream and need to ensure every record matches a schema before it enters your database. jq can check types but the expressions get unreadable fast. A bad record slips through and corrupts downstream aggregations.

Before and after

Before

cat records.jsonl | while read line; do
  echo "$line" | jq -e '.name | type == "string"' > /dev/null && \
  echo "$line" | jq -e '.age | type == "number"' > /dev/null && \
  echo "$line"
done

After

cat records.jsonl | vrk validate --schema '{"name":"string","age":"number"}'

Example

cat records.jsonl | vrk validate --schema '{"name":"string","age":"number"}' --strict

Exit codes

CodeMeaning
0All records passed
1Record failed in –strict mode, or scanner error
2–schema missing, schema JSON invalid, unknown flag

Flags

FlagShortTypeDescription
--schema-sstringJSON schema inline or path to .json file (required)
--strictboolExit 1 on first invalid record
--fixboolSend invalid records to vrk prompt for repair
--json-jboolAppend metadata trailer after all output
--quiet-qboolSuppress stderr output