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

cuts

v1.0.6

Published

Common Unix Thing Server; do common unix things all the time.

Readme

Common Unix Task Server

Some things are just easier if you run standard unix tools. It might be the easiest way to get visibility on disc usage, for example.

So this is a little server that runs unix commands frequently and lets us know the result.

Using as a server

 $ npm install -g cuts
 $ node cuts

the server will present an HTTP interface and start doing some default commands every 15 minutes.

Use as a module

 $ npm install cuts

You can write a module which will make the server available and heavily customize it:


const cutsServer = require("cuts");

cutsServer.boot(8001, {
  appCallback: function (app) {
     app.get("/service-status", (req, res) => {
        res.json({
           up: true,
           lastQueryedDate: new Date()
         });
     });
  }
});

Included in the repository is demo.js which is an example server with cuts as a module.

Options to pass to boot

  • runInterval - the time in seconds to run the commands.
  • appCallback - a function, called with the express app so you can configure routes.
  • listenerCallback - a function, called with the listener address so you can enquire of the listener.
  • logDir - a string indicating the path of the log directory where the output of the commands is collected; by default this is "logdir".
  • commands - an object describing the keys to run.
  • shell - a name to exec (either a bare name or a full filename) of the shell to use; bash by default.

commands

An example commands:


{ 
  "du_of_home_dir": "du -h ~/",
  "disc_free": "df -h",
  "uptime": "uptime"
  }

The keys are descriptions but also must be capable of being directory names.

The values are unix commands expressed as a string. These are passed to bash directly as a script.

Other customizations

When used as a program the PORT environment variable is examined for the listener port.

If nothing is in PORT then 8001 is used as a default.

What is cuts for?

We have a lot of monitoring tools for cloud environments but in a situation where you have lots of cattle like servers sometimes the quickest way to get a job done is to use a unix command.

cuts let's you specify those unix commands, run them frequently and capture the output.

This gives you an extra layer of monitoring.