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

@acransac/legal-notice

v1.0.0

Published

List the copyright holders and licenses of a module and its dependencies

Readme

Introduction

legal-notice is a command-line tool that lists the copyright holders and licenses of a npm module and its dependencies.

Most open-source licenses allow to use one's work as long as the attribution to the copyright holders and the license they give to their users are included in the derivative work. One way to include this information, proposed for example in the Apache License 2.0, is to write the human-readable copyright attribution and license in a NOTICE file shipped with the distribution. legal-notice generates the content of such a proposed file so you can deliver it with your piece of software.

Alternative approaches, typically implemented in module bundlers, gather this licensing information in source-code comments or humand-and-machine-readable formats like json or csv. legal-notice aims for better visibility and easier access to this information. It is independent from your choice of bundler, if any.

This tool formats to a human-readable text document the output of license-checker. This latter piece of software can be used to generate a short summary of the types of licenses used by your module's dependencies. You can then check whether your license complies with your dependencies' with this compatibility checker.

Installation

To install legal-notice globally, run:

    $ npm install --global @acransac/legal-notice

Within your module, you can install it with:

    $ npm install --save-dev @acransac/legal-notice

Or you can try it directly with:

    $ npx @acransac/legal-notice

Usage

legal-notice does not take any argument but looks for package.json where it is executed from. It writes to the standard output the list of copyright holders and licenses of the module in the current directory and its dependencies.

For example, to write a NOTICE file with the attribution and licensing information, after installing the tool in your module you can run from the directory where your package.json is:

    $ npx legal-notice > NOTICE

Or add a script in package.json:

  ...
  "scripts": {
    "legal": "legal-notice > NOTICE",
    ...
  },

And run it with:

    $ npm run legal

Update the NOTICE after installing, updating or uninstalling any dependency in your module.

Note that you can get help about the tool with:

    $ npx legal-notice --help