jq
Summary
Section titled “Summary”Installs jq, the lightweight command-line JSON processor, either as a pre-built binary from GitHub Releases or compiled from source with a built-in Oniguruma regex library.
Syntax / Usage
Section titled “Syntax / Usage”Binary
Section titled “Binary”zi for \ from'gh-r' \ sbin'* -> jq' \ nocompile \ @jqlang/jqCompile from source
Section titled “Compile from source”zinit for \ configure'--with-oniguruma=builtin' \ make \ jqlang/jqDetails
Section titled “Details”Binary variant
Section titled “Binary variant”from'gh-r'— downloads the release asset from GitHub Releases.sbin'* -> jq'— creates a shim namedjqpointing to the downloaded binary (requireszinit-annex-bin-gem-node).nocompile— skips Zinit’s Zsh compilation step (not applicable to a binary).
Compile-from-source variant
Section titled “Compile-from-source variant”configure'--with-oniguruma=builtin'— runs./configure --prefix=$ZPFX --with-oniguruma=builtin, bundling the Oniguruma regex library so no system dependency is needed.make— builds and installsjqinto$ZPFX.
For the binary variant, zinit-annex-bin-gem-node must be loaded first. The compile-from-source variant requires standard build tools (gcc/clang, make, autoconf).
Examples
Section titled “Examples”# Binary variant (fast, no compilation)# prerequisite — load once at the top of .zshrczinit light-mode for zdharma-continuum/zinit-annex-bin-gem-node
zi for \ from'gh-r' \ sbin'* -> jq' \ nocompile \ @jqlang/jq
# OR: compile from sourcezinit for \ configure'--with-oniguruma=builtin' \ make \ jqlang/jq