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 jsonl

About

Converts between JSON arrays and JSONL (one record per line). Splits arrays for pipeline processing, or collects JSONL lines back into an array when an API expects one. Uses a streaming decoder, so it handles arrays larger than available memory.

The problem

You have a 3GB JSON array from a data export and need to process records one per line. jq -c ‘.[]’ loads the entire array into memory and gets OOM-killed. Going the other direction - collecting JSONL back into an array for an API that expects one - requires careful bracket and comma handling that breaks on empty input.

Before and after

Before

# split: jq loads entire array into memory, OOM on large files
cat data.json | jq -c '.[]'
# collect: manual bracket/comma handling
echo '['; cat records.jsonl | sed 's/$/,/' | sed '$ s/,$//' ; echo ']'

After

cat data.json | vrk jsonl
cat records.jsonl | vrk jsonl --collect

Example

cat data.json | vrk jsonl

Exit codes

CodeMeaning
0Success, including empty input
1Invalid JSON, I/O error
2Interactive TTY with no input, unknown flag

Flags

FlagShortTypeDescription
--collect-cboolCollect JSONL lines into a JSON array
--json-jboolAppend metadata trailer after all records (split mode only)