Skip to content

A minimal JSON Lines processor for CLI pipelines.

License

Notifications You must be signed in to change notification settings

amcbstudio/jsonl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

amcbstudio / jsonl

A minimal JSON Lines processor for CLI pipelines.

Install

# Clone and add to PATH
git clone https://github.com/amcbstudio/jsonl.git
chmod +x jsonl/jsonl
export PATH="$PATH:$(pwd)/jsonl"

Requires: jq

Usage

jsonl [command] [options]

Commands

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

Examples

# 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}

Exit codes

Code Meaning
0 Success
1 Invalid input or usage
2 Missing dependency (jq)

Test

./test.sh

This 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

What this repository contains

  • 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.

Non-goals

  • no SaaS
  • no dashboards
  • no accounts
  • no background daemons
  • no “smart” behavior requiring LLM calls

This repository is infrastructure, not a product.

About

A minimal JSON Lines processor for CLI pipelines.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages