Services Portfolio Tools Journal About
Back to Journal
October 10, 2026

Open Source CLI Tools on npm: A Curated List for Developers

CLInpmOpen SourceDeveloper Tools

The best open source CLI tools on npm share one trait: they solve a small, repeated annoyance and then get out of the way. This curated list collects the command-line utilities I actually keep installed — most of them are mine (BenihKode Dev Tools), and a few are widely used packages worth knowing.

Every entry installs with a single npm command and runs from the terminal.

Why CLI tools still win on npm

GUIs come and go; a good CLI tool is scriptable, composable, and works over SSH. npm is the distribution channel that made this class of tool mainstream: npx lets you try a utility without a permanent install, and npm install -g pins it for daily use. The packages below are all open source and small enough to read.

Commit and Git workflow tools

gitcommitgen — generates a conventional commit message from your staged diff.

npm install -g @fanioz/gitcommitgen
gitcommitgen --commit

secretsweep — scans staged files for API keys and tokens before they leave your machine.

npm install -g @fanioz/secretsweep
npx secretsweep staged

Both are covered in detail on their tool pages: gitcommitgen and secretsweep.

Data and JSON tools

jsonask — query JSON in plain English instead of jq syntax.

npm install -g @fanioz/jsonask
jsonask users.json "where role is admin"

If you spend more time remembering jq filters than getting answers, this is the one to install. Full examples live on the jsonask tool page.

Environment and config tools

envtainer — validate and diff .env files across environments.

npx envtainer validate
npx envtainer diff development production

See the envtainer page for the workflow.

Established community tools worth having

Beyond the BenihKode set, a few npm-distributed CLIs earn their install:

ToolInstallWhat it does
eslintnpm i -g eslintLint JavaScript and TypeScript
prettiernpm i -g prettierOpinionated code formatting
http-servernpm i -g http-serverServe a folder over HTTP in one command
npnpm i -g npGuided, safer npm package publishing
degitnpm i -g degitClone a repo template without git history

Each one replaces a task you would otherwise do by hand or with a heavier tool.

How to evaluate an npm CLI before installing it

Not every small package deserves a global install. A quick checklist:

  • Read the package page. Last publish date, weekly downloads, and open issues tell you whether it is maintained.
  • Check dependencies. A CLI with three dependencies is easier to trust than one with three hundred.
  • Prefer npx first. Try the tool without committing to a global install.
  • Confirm the scripts. Run npm view <pkg> scripts to see what it executes on install.
  • Look for a lockfile and a repo. A real repository and CI are good signals.

This is the same scrutiny you apply to any dependency — a CLI tool is a dependency that happens to have a command name.

What to look for in a curated CLI list

A useful curated list is not a dump of every package that mentions “cli” in its description. The tools worth listing share a few properties, and the list above was filtered on them:

  • One job. The tool does a single thing well, which makes it composable with the rest of your shell.
  • Zero or minimal configuration. If a tool needs a config file before its first useful run, it does not get adopted.
  • Reads and writes standard streams. A tool that reads stdin and writes stdout chains with grep, jq, and friends instead of fighting them.
  • A single install command. npm install -g or npx, nothing more.
  • Open source and readable. You can inspect what runs on install.

Those five filters eliminate most npm noise and leave a set you can adopt without regret.

Building a small, composable toolkit

The value of a curated list is not the individual tools; it is how they combine. A few examples from packages above, strung together:

# Query an API response, filter it, and pretty-print the result
curl -s https://api.example.com/items \
  | jsonask "where status is active" -o json \
  | jq '.[0]'
# Guard the commit path before you describe it
git add -p && npx secretsweep staged && gitcommitgen --commit

The pattern is consistent: each tool owns one step and passes plain data to the next. That is the advantage of npm-distributed CLIs over heavyweight IDEs — you assemble exactly the pipeline your project needs.

Build your own

The reason these tools exist is that the barrier to publishing a CLI on npm is low. A Node script plus a bin field in package.json is a shippable tool. From Script to Tool walks through that step, and Shipped: My First npm Package covers the publishing details. If you have a script you run more than once a week, that is a CLI waiting to be published.

The shortlist

If you install only five today:

  1. gitcommitgen for commit messages
  2. secretsweep for pre-commit secret scanning
  3. jsonask for JSON queries
  4. envtainer for environment validation
  5. eslint + prettier for code quality

Each installs in seconds and earns its place within a day.

Browse the full set on the developer tools collection, and check the BenihKode Journal for build stories behind each one.