Skip to content

Getting Started

jkit is a tiny command-line tool that does four useful things to JSON: pretty-print it, fold the deep parts into summaries, pluck out a single value by path, or build a JSON array from a list of lines. It reads from stdin when piped into, and falls back to the system clipboard otherwise — so most of the time the workflow is just copy a JSON blob, run jkit f.

60-second tour

Install it once:

bash
go install github.com/wuhan005/jkit/cmd/jkit@latest

Pretty-print:

bash
> echo '{"a":1,"b":[2,3]}' | jkit f

{
    "a": 1,
    "b": [
        2,
        3
    ]
}

Fold a deep tree:

bash
> echo '{"meta":{"a":1,"b":2},"items":[1,2,3]}' | jkit c 1

{
    "items": [ 3 items array ],
    "meta": { 2 items dict }
}

Pluck a value by path:

bash
> echo '{"user":{"name":"alice","age":30}}' | jkit g user.name
alice

Build a JSON array from lines:

bash
> printf 'apple\nbanana\ncherry\n' | jkit m

[
    "apple",
    "banana",
    "cherry"
]

What's next?

  • Installation — install methods, supported platforms, and Go version requirements.
  • Input handling — exactly how jkit decides between stdin and the clipboard.
  • Commands — full reference for each of the four commands.
  • Recipes — common shell-pipe combinations.