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

vcgrep

v0.3.0

Published

File content search tool based on regular expression capture groups with simple terminal visualization.

Readme

vcgrep

vcgrep prints a summary of all the matches of a regular-expression capture group within input files. Simple terminal visualization of the progress and results is provided. Use it to easily show the frequency of status codes from apache access logs, or the frequency of words in a text document.

Build Status

Install

vcgrep requires node 0.10 or later.

npm install -g vcgrep

Examples

Frequency of status codes in an apache access log:

vcgrep '(\d+)\W+\d+$' test/sample-access.log

Frequency of words found in a text document:

vcgrep -g '(\w+)+' README.md

Frequency of words found in js documents using the full page card progress mode:

vcgrep  -p card -o none -g  -i --include '*.js' '(\w+)+' lib

Syntax

Usage: vcgrep [OPTIONS] PATTERN FILES...

Pattern

The pattern is a regular expression containing at least one capture group.

For more details on the JavaScript regular expression syntax, see: MDN

General Options

--help             Prints a summary of the usage
--verbose, -v      Verbose logging
--version          Show version number

File Selection Options

--exclude          Exclude files that match the wildcard
--include          include only files that match the wildcard

Pattern Matching Options

--global, -g       Multiple matches per line are considered
--ignore-case, -i  Ignore case for determining capture key

Output Options

--head, -h         Limit results to the most frequent n entries
--output, -o       Output format, one of: count,none,plain,json,histogram  [default: "histogram"]
--progress, -p     Progress feedback, one of: card,none,line               [default: "line"]

API

The searching, progress, and report output features are available to NodeJS modules through an API module.

For examples of how to use the API see: lib/api.js

var vcgrep = require('vcgrep');


vcgrep.searchFiles(/(\w+)+/g, ['README.md'], {progress: 'none'}, function(err, matches) {
  vcgrep.writeOutput('histogram', matches);
  console.log('Found '+matches.total+' hits across: '+matches.totalFiles+' files');
});

Change Log

[Unreleased][unreleased]

[0.3.0] - 2015-02-23

Added

  • --exclude file wildcard option
  • count output option with total matches and files

Changed

  • Progress API now event based
  • Change ignore case flag to --ignore-case from --ignore to match grep
  • Pass options to search api as object

[0.2.1] - 2015-02-17

Added

  • 'card' full page progress
  • --ignore case of capture key

[0.2.0] - 2015-02-16

Added

  • Introduce simple API entry point for direct use by NodeJS modules
  • Process exit code, 0 when matches found, 1 no matches

[0.1.0] - 2015-02-14

Added

  • Initial feature set

Licence

vcgrep is released under the MIT licence.

Author

David Jones

http://www.dgjones.info

https://github.com/jonesd/vcgrep