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

sponsored-push

v0.0.2

Published

A prepare-commit-msg hook that injects sponsored ads into your git commits. The future of developer monetisation.

Downloads

195

Readme

sponsored-push™

A prepare-commit-msg git hook that appends a sponsored message to every commit. Works standalone or with Husky. Ads are fetched from a remote ads.txt file at commit time, with a built-in fallback list if the request fails.

If it isn't already obvious, this is a pisstake.

feat: fix login bug

# sponsored
# Magic Spoon: high-protein, low-carb cereal that tastes like the Saturday
#    morning cartoons of your childhood. Code: COMMITS for free shipping.

Requirements

  • Node.js 24 or later
  • Git

Installation

npm install --save-dev sponsored-push

The prepare-commit-msg hook is registered automatically via the prepare npm lifecycle script. No additional setup is needed for most projects.

To verify the hook was installed:

cat .git/hooks/prepare-commit-msg

Usage

Once installed, the hook runs automatically on every git commit. No command needs to be run manually.

To run it directly against a commit message file:

npx sponsored-push .git/COMMIT_EDITMSG

Husky

If your project uses Husky, the installer will detect it and skip the automatic .git/hooks setup, printing manual instructions instead. To wire it up yourself, add the following to .husky/prepare-commit-msg:

#!/bin/sh
npx sponsored-push "$1"

Then make it executable:

chmod +x .husky/prepare-commit-msg

Setting up Husky from scratch

npm install --save-dev husky sponsored-push
npx husky init
echo 'npx sponsored-push "$1"' >> .husky/prepare-commit-msg
chmod +x .husky/prepare-commit-msg

With lint-staged

If you're already using lint-staged, your package.json might look like this:

{
  "scripts": {
    "prepare": "husky"
  },
  "lint-staged": {
    "*.{js,ts}": "eslint --fix"
  }
}

And .husky/prepare-commit-msg:

#!/bin/sh
npx lint-staged
npx sponsored-push "$1"

How ads are loaded

On each commit, sponsored-push will:

  1. Make an HTTP request to the configured ADS_URL (default: https://cdn.tom.so/ads.txt) with a 3-second timeout
  2. Parse the response — one ad per line, lines beginning with # are treated as comments
  3. Select one ad at random and append it to the commit message as a # comment

The ad is appended as a git comment, which means it is visible in your editor during the commit but is not stored in the commit body — it won't show up in git log.

If the remote fetch fails for any reason (network unavailable, non-200 response, timeout), sponsored-push falls back to a built-in list of ads and continues without error.

Hosting your own ads.txt

To use a custom ad list, update the ADS_URL constant at the top of bin/sponsored-push.js:

const ADS_URL = "https://your-cdn.example.com/ads.txt";

The format is plain text, one ad per line:

# ads.txt — lines starting with # are ignored
This commit sponsored by HelloFresh. Use code DEPLOY16 for 16 free meals.
Brought to you by NordVPN. Code: GITPUSH for 68% off.

Skipped commits

sponsored-push will not modify the commit message for:

  • Merge commits (message begins with Merge)
  • Fixup commits (fixup! or squash! prefix)
  • Empty commit messages

CI environments

The install script checks for the CI and CONTINUOUS_INTEGRATION environment variables and skips hook registration automatically, so it won't interfere with your pipeline.