npm fund
In November 2019, npm introduced the npm fund
command. If you've run npm install
recently, you've seen the gentle reminder: "4 packages are looking for funding. Run npm fund
for details."
As npm’s former CEO, Isaac Schlueter, noted, maintainers have historically had “very few ways to get funding information in front of the people using their code.” The npm fund
command addresses this through three complementary design principles:
- Timely prompts: The reminder appears right after
npm install
finishes, when developers have just downloaded dependencies and are about to use them. This leverages the psychological principle of temporal relevance, surfacing information when its value is most salient. - Progressive disclosure: The notice is a single, ignorable line. The actual list of dependencies seeking support is hidden until you explicitly ask for it. And users can suppress it permanently via
--no-fund
or a.npmrc
setting. - Minimal interaction cost: Typing
npm fund
prints a collapsed tree of packages and their funding links; duplicates are grouped so you don’t see the same URL over and over. Runningnpm fund <package>
opens that package’s funding page in your default browser, and the--which
flag lets you choose between multiple funding sources. The path from awareness to action requires only a single command.
Under the hood, npm relies on metadata that maintainers add to package.json
. Because npm fund
builds on standard metadata, maintainers can expose funding links without code changes. This solves the maintainer‑side frictions.
Mind the Gap
Here's the fascinating part: most other package managers have the infrastructure for funding metadata but lack the user-facing tooling.
Python supports funding URLs in pyproject.toml
metadata, and PyPI exposes these through its JSON API, but has no built-in pip fund
command. R packages can include funder fields in DESCRIPTION
files, but CRAN has no discovery tools. Rust has funding fields in Cargo.toml
, but no equivalent to npm fund. Ruby gems can specify funding URIs, but RubyGems lacks integrated discovery.
Note: I recently released pip-fund
(see here) to fill this gap, but the tool doesn't integrate with pip directly.
The Broader Pattern
In academic software, developers often include citation information in their package metadata, yet researchers rarely see it. Some R package creators have created citation reminders via .onAttach
messages, using the same “timely prompt” principle (see here), but broader support (via install.packages
, etc.), is missing.