a TUI playground for exploring jq.
This application utilizes itchyny's implementation of jq
written in Go, gojq
.
brew install noahgorstein/tap/jqp
sudo port install jqp
Download the relevant asset for your operating system from the latest Github release. Unpack it, then move the binary to somewhere accessible in your PATH
, e.g. mv ./jqp /usr/local/bin
.
Clone this repo, build from source with cd jqp && go build
, then move the binary to somewhere accessible in your PATH
, e.g. mv ./jqp /usr/local/bin
.
➜ jqp --help
jqp is a TUI to explore the jq command line utility
Usage:
jqp [flags]
Flags:
-f, --file string path to the input JSON file
-h, --help help for jqp
-v, --version version for jqp
jqp
also supports input from STDIN.
➜ curl "https://api.github.com/repos/stedolan/jq/issues?per_page=2" | jqp
Keybinding | Action |
---|---|
tab |
cycle through sections |
shift-tab |
cycle through sections in reverse |
ctrl-y |
copy query to system clipboard1 |
ctrl-s |
save output to file |
ctrl-c |
quit program |
Keybinding | Action |
---|---|
enter |
execute query |
ctrl-a |
go to beginning of line |
ctrl-e |
go 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 |
Keybinding | Action |
---|---|
↑/k |
up |
↓/j |
down |
ctrl-u |
page up |
ctrl-d |
page down |
- jqq for inspiration
Footnotes
-
jqp
uses https://github.com/atotto/clipboard for clipboard functionality. Things should work as expected with OSX and Windows. Linux, Unix requirexclip
orxsel
to be installed. ↩