npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@antti5/jgrep

v0.2.0

Published

Grep-like tool for JSON

Readme

jgrep

This is a simple command-line tool that searches JSON files with a syntax very similar to grep.

Instead of matching the regular expression against the file content, the expression is matched against the key path of the traversed JSON content. Values whose key paths match the expression are printed out.

Install globally with: npm install --global @antti5/jgrep

Example

$ jgrep repository.url package.json
git+https://github.com/antti5/cmd-line-args.git

Compressed files

To help working with large files, the tool has built-in support for files compressed with Gzip, XZ or Brotli. These files are decompressed on the fly based on the file extension.

Gzip and XZ files are also decompressed when read from stdin, but for Brotli this is not possible because it does not have a magic signature.

JSON files with comments

If the input file has extension .jsonc then it can contain C-style comments i.e. either /* */ block comments or // line comments. These comments are removed before the JSON is parsed.

Options

| Option | Description | | --- | ----------- | | -k, --key | Instead of printing the property value, print the matched key | | -p, --path | Instead of printing the property value, print the matched key path | | -f, --file | Print only the file name if there is a match | | -q, --quiet | Print nothing, only indicate matches with process exit value | | -i, --ignoreCase | Use case-insensitive matching | | -V, --matchValue | Instead of matching the property key path, match property values | | -o, --one | Print only one match for each input file | | -I, --indent | Print matched object values indented on multiple lines | | -U, --unique | Print each unique property value only once for each input file | | -E, --enclosing | Print the enclosing object of the matching property | | -L, --lookup | When property keys are printed, property keys are looked up from files listed in environment variable JGREP_ID_FILES |

The option -L or --lookup is intended for cases where the JSON file uses property keys that are not human-readable. In this case mapping can be provided with CSV-formatted files where each line contains an identifier and a human-readable value separated by a semicolon ;. For example:

123;John
456;Mary
789;Fido

Several such lookup files can be provided, and their filenames can be set in the environment variable JGREP_ID_FILES delimited with semicolons.