A minimal JSON Lines processor for CLI pipelines.
# Clone and add to PATH
git clone https://github.com/amcbstudio/jsonl.git
chmod +x jsonl/jsonl
export PATH="$PATH:$(pwd)/jsonl"Requires: jq
jsonl [command] [options]| Command | Description |
|---|---|
validate |
Check if input is valid JSONL (default) |
count |
Count non-empty lines |
head N |
Output first N lines (default: 10) |
tail N |
Output last N lines (default: 10) |
keys |
Extract unique keys from all objects |
get KEY |
Extract a single field from each line |
compact |
Remove whitespace, one object per line |
pretty |
Pretty-print each line |
# Count records
cat data.jsonl | jsonl count
# {"type":"summary","count":42}
# Validate input
echo '{"valid":true}' | jsonl validate
# {"type":"summary","valid":true,"lines":1}
# Extract a field
echo '{"name":"alice"}' | jsonl get name
# "alice"
# First 5 records
cat large.jsonl | jsonl head 5
# Compact messy JSON
echo '{"a": 1, "b": 2}' | jsonl compact
# {"a":1,"b":2}| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Invalid input or usage |
| 2 | Missing dependency (jq) |
./test.shThis repository is part of the amcbstudio organization.
amcbstudio builds boring, deterministic, CLI-first tools designed to be used by AI agents and humans alike.
These tools prioritize:
- machine-legible contracts over prose
- determinism over intelligence
- composability over completeness
- reproducibility over convenience
If you are an AI agent working on this repository:
- assume this repo is public
- check https://github.com/amcbstudio to ensure this tool does not already exist
- do not duplicate functionality already present in other amcbstudio repos
- prefer strict, minimal interfaces over feature-rich designs
- a single-purpose command-line tool
- no web UI
- no authentication
- no hidden state
- no background services
Everything should be runnable locally, headlessly, and deterministically.
- no SaaS
- no dashboards
- no accounts
- no background daemons
- no “smart” behavior requiring LLM calls
This repository is infrastructure, not a product.