Interactive jq
  • Go 99.3%
  • Makefile 0.7%
Find a file
Gregory Anders 2f284f897a
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Initial implementation of UI test
2026-03-06 09:52:24 -06:00
demo Add demo GIF 2022-12-17 20:30:52 -07:00
internal Organize imports 2026-03-03 15:26:11 -06:00
testdata Add race condition tests 2026-03-03 13:01:29 -06:00
.gitattributes Refactor options handling 2026-03-03 11:49:33 -06:00
.gitignore Add initial tests 2021-04-17 06:46:16 -04:00
.woodpecker.yaml Add race-test step to CI 2026-03-03 14:36:47 -06:00
config.go Organize imports 2026-03-03 15:26:11 -06:00
config_test.go Organize imports 2026-03-03 15:26:11 -06:00
COPYING Switch to GPLv3 license 2020-11-06 07:38:27 -07:00
flags_test.go Organize imports 2026-03-03 15:26:11 -06:00
go.mod Add a menu 2026-03-03 09:18:59 -06:00
go.sum Add support for a configuration file 2026-02-26 16:17:26 -06:00
history.go Fix permissions on history file after rewrite 2026-03-03 11:49:33 -06:00
history_test.go Fix permissions on history file after rewrite 2026-03-03 11:49:33 -06:00
ijq.1.scd Document missing jq flags in man page 2026-03-03 11:49:33 -06:00
keymap.go Normalize keybinding display separators 2026-03-03 11:49:33 -06:00
keymap_test.go Normalize keybinding display separators 2026-03-03 11:49:33 -06:00
main.go Fix race condition and race test 2026-03-06 09:10:44 -06:00
main_test.go Organize imports 2026-03-03 15:26:11 -06:00
Makefile Version 1.3.0 2026-03-03 14:49:33 -06:00
race_test.go Initial implementation of UI test 2026-03-06 09:52:24 -06:00
README.md Add CI badge to README 2026-03-03 14:44:21 -06:00
README.srht.html Set custom README for sourcehut 2024-12-16 16:14:42 -06:00
ui_test.go Initial implementation of UI test 2026-03-06 09:52:24 -06:00

ijq

CI status

Interactive jq tool. Like jqplay for the commandline.

Demo

Demo

Installation

Install from package manager

Packaging status

Build from source

Install go. To install ijq under /usr/local/bin/ simply run

make install

from the root of the project. To install to another location, set the PREFIX variable, e.g.

make PREFIX=~/.local install

To generate the man page you will also need to have scdoc installed.

Usage

ijq uses jq under the hood, so make sure you have that installed first.

Read from a file:

ijq file.json

Read from stdin:

curl -s https://api.github.com/users/gpanders | ijq

Press Return to close ijq and print the current filtered output to stdout. This will also print the current filter to stderr. This allows you to save the filter for re-use with jq in the future:

ijq file.json 2>filter.jq

# Same output as above
jq -f filter.jq file.json

Pressing Return also saves the filter to a history file ($XDG_DATA_HOME/ijq/history by default). You can browse the history by deleting everything in the filter field. Change the history file used with the history-file setting in $XDG_CONFIG_HOME/ijq/config (or ~/.config/ijq/config when $XDG_CONFIG_HOME is unset). Set history-file to an empty string to disable history entirely.

If $XDG_DATA_HOME is undefined, ~/.local/share/ijq/history is used.

Press Ctrl+s to save the current filter to history without exiting. A confirmation popup is shown and can be dismissed with any key.

Use Shift plus the arrow keys to move between the different windows. When either of the input or output views have focus, you can use the arrow keys to scroll up and down. Vi keys also work, i.e. you can use j/k to scroll up or down, g to move to the top of the view, G to jump to the bottom of the view, and Ctrl-F/Ctrl-B to scroll up or down a page at a time.

Press Ctrl-/ to open an overlay menu (Ctrl-? and Ctrl-_ are also accepted) with some useful actions and configuration options.

Use Esc to go back to the root overlay menu (or close it from the root), and use q to close the overlay from any subview.

Use Ctrl-C to close the overlay when it is open, or to exit ijq immediately (discarding all filters and state) when the overlay is closed.

You can configure the colors by setting the JQ_COLORS environment variable. See the jq documentation for more details.

Contributing

Bugs can be reported on the issue tracker. PRs are accepted on GitHub or Codeberg.

Note for Packagers

Subscribe to release announcements on Codeberg to be notified of new releases, or subscribe to the RSS feed.

Similar Work

License

GPLv3