Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jlkit

A JSONL-native command-line toolkit. jq is a per-line expression language and jless/jnv are viewers — none give ergonomic dataset-level operations on newline-delimited JSON, the format every LLM / eval / log / data pipeline emits. jlkit does.

Everything streams: it never loads the whole file and it tolerates malformed lines (reporting them by number where that matters).

Status: beta (v0.1.1) — on PyPI. All seven subcommands work.

Install

pip install jlkit        # or: pipx install jlkit

Usage

jlkit head -n 20 data.jsonl
cat data.jsonl.gz | jlkit tail 5
jlkit select id,user.name,ts events.jsonl

# keep records matching a safe predicate (no eval): ==,!=,<,<=,>,>=,
# exists, contains, and/or/not, parens, dotted paths
jlkit filter 'status == "error" and retries > 3' logs.jsonl
jlkit filter 'user.name contains "bot" or not active' events.jsonl

# per-field presence %, null %, observed types, numeric min/max/mean/stddev,
# string cardinality (nested keys shown as dotted paths)
jlkit stats data.jsonl

# infer a JSON Schema (draft 2020-12) over a full pass
jlkit schema data.jsonl > schema.json

# report malformed lines (and, with --schema, non-conforming records) by
# 1-indexed line number; exits non-zero on any failure — CI-friendly
jlkit validate data.jsonl
jlkit validate --schema schema.json data.jsonl

--limit N stops after N input records; every command reads stdin or a file arg and handles .gz transparently.

Development

python -m venv .venv && .venv/bin/pip install pytest
.venv/bin/python -m pytest -q

License

MIT

About

A JSONL-native CLI: dataset-level filter / stats / schema / validate for newline-delimited JSON. Streaming, dependency-free.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages