• Stars
    star
    135
  • Rank 267,976 (Top 6 %)
  • Language
    Go
  • License
    GNU General Publi...
  • Created about 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Interactive jq (mirror)

ijq

Interactive jq tool. Like jqplay for the commandline.

Demo

Demo

Installation

Install from package manager

Packaging status

Download a pre-compiled release

Select the version you want to download from sourcehut and download one of the pre-compiled releases from that page. Then extract the archive and copy the binary and, optionally, the man page to the correct location.

Example:

wget https://git.sr.ht/~gpanders/ijq/refs/download/vX.Y.Z/ijq-vX.Y.Z-linux-amd64.tar.gz
tar xf ijq-vX.Y.Z-linux-amd64.tar.gz
cd ijq-vX.Y.Z
cp ijq /usr/local/bin
mkdir -p /usr/local/share/man/man1
cp ijq.1 /usr/local/share/man/man1

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 -H option, or specify an empty string to disable history entirely (i.e. -H '').

If $XDG_DATA_HOME is undefined, then the directory used is platform dependent.

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.

Use Ctrl-C to exit ijq immediately, discarding all filters and state.

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

Contributing

Have a question, comment, or feature request? Send an email to the mailing list.

Report bugs on the ticket tracker. You can file a ticket without a sourcehut account by sending a plain text email to ~gpanders/[email protected].

Send patches to ~gpanders/[email protected] or open a pull request on GitHub.

Similar Work

License

GPLv3

More Repositories

1

editorconfig.nvim

EditorConfig plugin for Neovim
Fennel
308
star
2

nvim-parinfer

parinfer for Neovim
Fennel
112
star
3

vim-medieval

Evaluate Markdown code blocks within Vim
Vim Script
101
star
4

nvim-moonwalk

Use any language that compiles to Lua in your Neovim configuration
Lua
57
star
5

vim-oldfiles

Improve Vim's native recent file history
Vim Script
27
star
6

meta-scipy

OpenEmbedded layer for scipy (ARCHIVED)
BitBake
20
star
7

fennel-repl.nvim

A Fennel REPL that runs in Neovim
Fennel
19
star
8

colmap-docker

Dockerized COLMAP
Shell
15
star
9

fzy.zig

Rewrite of fzy in Zig (mirror)
Zig
15
star
10

esp32-zig-starter

Starter project for using Zig with ESP IDF
Zig
12
star
11

fzf-prezto

fzf module for prezto zsh framework
Shell
12
star
12

ztags

Generate tags files for Zig projects
Zig
12
star
13

dotfiles

Mirror
Fennel
12
star
14

vim-scdoc

Vim runtime files for scdoc
Vim Script
5
star
15

vitis_example

Example project for Xilinx Vitis
Tcl
5
star
16

zynqmp-boot-apps

Generate and install boot apps for the Zynq MPSoC device
Makefile
5
star
17

passage

Password store using age
Rust
4
star
18

nvim-scpaste

Fennel
4
star
19

gnss-signal-processing

GNSS Signal Processing (ASE 389P-7) [Spring 2017]
MATLAB
3
star
20

pushbroom

Sweep your filesystem free of clutter
Python
3
star
21

homebrew-tap

Custom Homebrew formulae
Ruby
2
star
22

adventofcode

Zig
2
star
23

fpga-design-template

Project template for Xilinx-based FPGA designs
Tcl
2
star
24

7guis

Swift
1
star
25

DragIt

Source for the DragIt! Chrome/Chromium extension
JavaScript
1
star
26

vim-man

Read man pages in Vim
Vim Script
1
star
27

slackbots-cli

JavaScript
1
star
28

acciobook

Python
1
star
29

meshtool

Data analysis tool for 3D surface meshes
C++
1
star