Installation
Requirements
- Go 1.21 or newer (only required if installing from source / via
go install). - macOS, Linux, or Windows. The clipboard fallback uses
atotto/clipboardand works on all three.
go install (recommended)
bash
go install github.com/wuhan005/jkit/cmd/jkit@latestThe binary lands in $GOPATH/bin (or $HOME/go/bin). Make sure that directory is on your PATH:
bash
export PATH="$HOME/go/bin:$PATH"From source
bash
git clone https://github.com/wuhan005/jkit.git
cd jkit
go install ./cmd/jkitVerify
bash
> jkit --help
NAME:
jkit - JSON CLI Tool
USAGE:
jkit [global options] command [command options]
COMMANDS:
format, f Pretty-print JSON
cut, c Fold JSON to a maximum depth
get, g Extract a JSON sub-element by path
maker, m Build a JSON string array from line-separated input
help, h Shows a list of commands or help for one commandLinux clipboard support
On Linux, the clipboard backend requires either xclip or xsel to be installed:
bash
# Debian / Ubuntu
sudo apt install xclip
# or
sudo apt install xsel
# Arch
sudo pacman -S xclipWithout one of these, jkit will still work fine for piped / redirected input — only the clipboard fallback is unavailable.
Uninstall
bash
rm "$(go env GOPATH)/bin/jkit"