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 🙏

© 2025 – Pkg Stats / Ryan Hefner

pero

v0.3.1

Published

Route based CLI tool

Readme

Feature

  • Route based, born to create nested CLI commands
  • ESBuild driven, really fast to compile your CLI project

Quick Tour

This project is under heavy development, APIs might be changed until the stable version is released. 📍Roadmap

1. Install

npm install pero --save
# or use
yarn add pero

2. Create a folder for CLI

mkdir src
cd $_ 
touch index.ts # or index.js

In the example above, index.ts is created in the root of the CLI source folder src, which is defined as the top-most command in CLI.

.
└── src
    └── index.ts

3. vim index.ts

Add the code and finish your first Pero app!

import { Command, Args } from 'pero'

export default (command: Command) => {
  // command registration: define your command here
  command
    .argument('[something]', 'your-description')
    .option('-e', 'environment')

  // action
  return (args: Args) => {
    // do something with user-input args here
    
    command.help() // print help message
  }
}

In Pero, we have to two steps in our runtime:

  • Step1: Registration, in the outer callback we have command passed as the first param, you can utilize this to define your command's arguments or options.
  • Step2: Action, in the inner callback we have args passed to, you may do something with user-input args

4. Compile and run

Pero CLI is currently under development, so you need to do the compilation yourself by adding a compiler.

Add compile.ts in the root of the whole project, and your project topography will look like this:

.
├── src
│   └── index.ts
└── compile.ts

Add some code for compilation:

import path from 'path'

import { Compiler } from 'pero'

(async () => {
  const compiler = new Compiler({
    outDir: path.resolve(__dirname, './dist'),
    root: path.resolve(__dirname, 'src'),
    name: 'name-your-cli'
  })

  await compiler.compile()
})()

Compiled CLI will be emitted to the outDir you defined above.

Run the code below, you will get the corresponding help message in the terminal.

node ./dist/index.js

Advanced Usage

Nested Command

With the demo project introduced in the Quick Tour section, try to add a new folder under src folder, you will get the nested command right away! This is really cool.

.
└── src
    ├── build ## the sub-command we added
    │    └── index.ts
    └── index.ts

To trigger the sub-command build, do the compilation first and run:

node ./dist/index.js build

You will see anything in the sub-command's action printed to the screen. Great!

📍Roadmap

This project is under heavy development, you may refer to this to get the latest update!

Acknowledgement

Special thanks to @yisar132 for the logo, it's great!

LICENSE

MIT