Highlights
Pure Perl
No compiler. No native libraries.
jq-compatible
Readable filters for scripts.
CLI & library
Use it everywhere.
Installation
From CPAN
cpanm JQ::Lite
Alpine Linux
apk add jq-lite # or perl-jq-lite
Manual install (stable CPAN tarball)
Requires Bash, curl, and Perl 5.14+. Download a stable
CPAN release over HTTPS only; internal developer builds are
not public install targets. For most users, prefer cpanm JQ::Lite.
set -euo pipefail
ver=$(
curl -fsSL --proto '=https' --proto-redir '=https' \
'https://fastapi.metacpan.org/v1/release/JQ-Lite' |
perl -MJSON::PP -0777 -ne '
my $release = decode_json($_);
die "Unexpected release metadata\n" unless ref($release) eq "HASH";
my $version = $release->{version};
die "Expected a stable numeric CPAN version\n"
unless defined($version) && !ref($version)
&& $version =~ /\A[0-9]+\.[0-9]+(?:\.[0-9]+)*\z/;
print $version;
'
)
curl -fsSL --proto '=https' --proto-redir '=https' \
"https://cpan.metacpan.org/authors/id/S/SH/SHINGO/JQ-Lite-$ver.tar.gz" \
-o "JQ-Lite-$ver.tar.gz"
tar xzf "JQ-Lite-$ver.tar.gz"
export PATH="$PWD/JQ-Lite-$ver/bin:$PATH"
Usage
jq-lite '.users[].name' users.json
Use cases
Locked-down servers
No package installs allowed.
CI/CD pipelines
Minimal dependencies.
Legacy & offline
Old systems, air-gapped networks.