This post was written for Nodejitsu blog and is crossposted here. Nodejitsu loved what I was doing at and is now supporting the project.

sum-up (GitHub: shinnn/sum-up, License: MIT) by Shinnosuke Watanabe is a perfect example of why Node.js ecosystem is amazing. This module is microscopic in size at just 40 lines of code but if you are writing a CLI tool it can save you 10 mintues of work and spare you the hassle of mundane work.

The only thing sum-up does, and it does it really well, is display a few fields from your own package.json. It’s as simple as that and nothing more and it even has full test coverage. It’s a tiny building block that will fit practically any CLI utility.

npm install sum-up


var sumUp = require('sum-up');

This will produce a neatly formatted info:

example-sum-up v1.0.0
Example which describes how to use the sum-up module.

What Else?

I like that Shinnosuke Watanabe released version 1.0 instead of forever iterating on 0.0.x which has been the trend in the last couple of years. I’m a strong advocate of 1.0 releases as soon as it makes sense.

Checkout the runnable example and github example repository. Have you seen other modules along these lines? Please let us know in the comments!