Skip to main content

Funding

npm fund

Retrieve funding information

Most likely you were exposed to the funding mechanic during Installation:

{x} packages are looking for funding
run `npm fund` for details

This feature was added in npm 6.13.0, following the blog post "Supporting Open Source Maintainers" and the acceptance of RFC-0017.

Reviewing funding requests

To see details of the packages requesting funding, as suggested by the message above, run npm fund. This will show a tree view of the funding URLs and associated packages from your dependency tree. For example, for the wtf, npm?! repository:

If you'd like to fund a particular package, you can automatically visit the URL by running npm fund {package}.

Suppressing funding requests

If you'd rather not see these funding messages, you can either:

  • use the --no-fund flag when running relevant npm commands (e.g. npm install --no-fund); or
  • add fund=false to a .npmrc file (you can use npm set fund=false to do this) to suppress it for all commands.

Soliciting funds

If you're publishing your own packages and you'd like people using them to know where to send contributions (if they're so minded), add the appropriate URL as the funding property in the package file:

{
"funding": "{url}"
}

As well as being used by the npm fund command, this link will be rendered in the npm web UI as a "fund this package" button on the package's home page.