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

proofreadme

v0.0.1

Published

Readme enforcement and validation

Downloads

2

Readme

Proofreadme

Readme enforcer/validation tool. Make sure your readme is still valid by running the logic in the readme.

Example

// README-example.md
# Welcome
Welcome to foobar. To setup and start the app use the following commands
```
# @prm-ignore-1 (ignores the next line in proofreadme validation)
npm install
# @prm-wait-until-regex-output-/Listening on port/ (wait for response before allowing the next action to occur)
npm start
```
To run e2e tests on the app, use
```
# @prm-final (when this command runs successfully, close all processes and exit with success signal)
npm run e2e
```

$ proofreadme -p README-example.md -h # Welcome
> npm start ...
> npm run e2e ...
> README-example.md run successfully

Explanation

We run proofreadme on the README-example.md file. First, we choose the header that we want to run commands from. We've chosen ### Welcome. Then it runs the npm start command and waits for a specific output before allowing the next command to run. This is only necessary for tasks that we need to keep alive. When the next command npm run e2e finishes, we know that the process has executed successfully.

Why is proofreadme necessary?

It's not unusual for readme files to become stale, which makes it harder for new team members to get started on a project. By running proofreadme as a part of the ci process, there is some ability to reduce the likelihood of a stale readme file.

CLI commands

-h, --headers (required)

Select which headers in the readme you would like to run the code segments from.

Example:

# A Package
## Setup
```
npm install
```
## Advanced
```
npx package --init
```
## Tests
```
npm test
```

$ proofreadme -h "# A Package"
> npm install
> npx package --init
> npm test
$ proofreadme -h "## Setup" "## Tests"
> npm install
> npm test

-p, --readme-path [path] (optional)

Provide the path to the readme file. (By default, will look for README.md, readme.md, and Readme.md)

$ proofreadme -p ./READ-ME.md

@prm-directives

@prm-ignore-x

Do not run the next x lines.

Example:

echo 1
# @prm-ignore-2
echo 2
echo 3
echo 4

Output:

> 1
> 4

@prm-wait-until-regex-output-/x/

For the line that follows this directive, wait until the regex x matches the stdout before moving to the next command. This is useful when you want to run tests against another process, like a web server.

Example:

# @prm-wait-until-regex-output-/Accepting connections/
npx serve -p 3001
curl http://localhost:3000

Explanation:

The curl command only fires after the serve command outputs Accepting connections.

Upcoming Features

  • [ ] @prm-threads-x (Run commands in different threads)
  • [ ] @prm-final-regex-output (When to exit long-running tasks)
  • [ ] @prm-section-match-/x/-/y/-z (Use a double regex to ensure that your readme includes all of the regex matches of a particular file)
  • [ ] @prm-file-folder-structure (Verifies that the project has the file-folder structure in the readme)
  • [ ] @prm-multiline-x (Run multiple lines with a single command)

Contributions

Contributions are welcome.