free counter
Tech

Jqp: A TUI playground for exploring jq

a TUI playground for exploring jq.

demo

This application utilizes itchny’s implementation of jq written in Go, gojq.

Installation

homebrew

brew install noahgorstein/tap/jqp

Github releases

Download the relevant asset for the operating-system from the most recent Github release. Unpack it, then move the binary to somewhere available in your PATH, e.g. mv ./jqp /usr/local/bin.

Build from source

Clone this repo, build from source with cd jqp && go build, then move the binary to somewhere available in your PATH, e.g. mv ./jqp /usr/local/bin.

Usage

 jqp --helpjqp is really a TUI to explore the jq command line utilityUsage:  jqp [flags]Flags:  -f, --file string   way to the input JSON file  -h, --help          help for jqp  -v, --version       version for jqp

jqp also support input from STDIN.

 curl "https://api.github.com/repos/stedolan/jq/issues?per_page=2" | jqp 

Keybindings

Keybinding Action
tab switch active section
ctrl-s save output to file
ctrl-c quit program

Query Mode

Keybinding Action
enter execute query
ctrl-a head to beginning of line
ctrl-e head to end of line
/ctrl-b move cursor one character to left
/ctrl-f move cursor one character to right
ctrl-k delete text after cursor line
ctrl-u delete text before cursor
ctrl-w delete word to left
ctrl-d delete character under cursor

Input Preview and Output Mode

Keybinding Action
/k up
/j down
ctrl-u page up
ctrl-d page down

Constructed with:

Credits

  • jqq for inspiration

Read More

Related Articles

Leave a Reply

Your email address will not be published.

Back to top button

Adblock Detected

Please consider supporting us by disabling your ad blocker