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 🙏

© 2024 – Pkg Stats / Ryan Hefner

pupergrep

v0.6.7

Published

Real-time grep for your logs right in your favorite modern browser made with Twitter Bootstrap.

Downloads

78

Readme

Pupergrep - have fun with log files, you nerds!

Screenshots & Features

Everybody loves screenshots!

screenshot

  • Grep only lines you like (skip non-fatal errors, stack traces, INFO lines).
  • Highlight only lines you dislike (FATAL errors, long responses).
  • Group highlight and grep conditions with AND/OR;
  • Limit output buffer to keep the whole log area on the screen or make it large to see everthing.
  • Pause log with button, hotkey (space) or hold mouse button on logs to take a look for fun facts in your error log.
  • Fast switching between many logs with handsome list with search box.
  • Font-size switching for eagles.
  • Send your colleagues links to your favorite logs with your settings and bookmark them.
  • Link activation in logs - just click on it to open.
  • Whole system and current log activity state indication.
  • Support for plain text, html and color ansi (yep, like in your terminal) logs.
  • Custom filters for log lines before outputting. Colorize if you want to.
  • Open-source. Can you imagine that?

Installation

This is pretty simple, believe me!

mkdir ~/mypupergrep
cd ~/mypupergrep
mkdir node_modules
npm install pupergrep

Now you have pupergrep module installed.

PuperGrep needs to know what to monitor. Simple server to make you understand what I mean:

(function() {
    var PuperGrep = require("pupergrep"),
        puper     = new PuperGrep();

    // if your log has ANSI escape sequences (default):
    puper.add("my_ansi_log", "/var/log/my_cool_log", "ansi");
    // or it may be interpreted as html
    puper.add("my_html_log", "/var/log/my_cool_log", "html");

    // if you want to colorize (decorate) your log before outputting as html:
    puper.add("fancy_log", "/var/log/my_cool_log", "html", function(line, callback) {
        callback(undefined, "<span style='color: red;'>" + line + "</span>");
    });

    puper.listen(8080, "127.0.0.1");
})();

Save it to ~/mypupergrep/server.js. Run it right after that:

node server.js

Now cross your fingers and open http://127.0.0.1:8080/ in your favorite browser. This is it!

Nginx configuration (optional)

If you want nginx in front of your logs for security or whatever, this is example config:

server {
    listen 80;
    server_name localhost;

    location / {
        index index.html;
        root /home/user/mypupergrep/node_modules/pupergrep/public;
    }

    location /socket.io/ {
        proxy_http_version 1.1;
        proxy_pass http://127.0.0.1:8080/socket.io/;
    }
}

This way you may open http://127.0.0.1/ and enjoy your logs. Note that nginx does not support websockets yet and you'll need to wait for 2 seconds to switch from ws to xhr-polling.

Troubles

Let me guess, you tried to monitor access log of nginx server that proxy your PuperGrep? You bastard! Stop it right now!

Another trouble? Hm. Post an issue!

Want to contribute?

You're welcome! Make a pull request and we'll see.

Authors

Contributors

Inspired by supergrep from Etsy.