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

canary-cli

v0.2.3

Published

CLI for Canary vulnerability scanner — register projects and configure CI scanning

Readme

Canary CLI (canary-cli)

canary-cli is the command-line interface for Canary: it registers a project, builds a dependency inventory from your lockfiles, and triggers vulnerability scans against that inventory.

Install

Global install (recommended):

npm install -g canary-cli
canary --help

One-off run without installing globally:

npx --package canary-cli canary --help

Quick Start

From the root of your repo:

canary init
canary scan

canary init will:

  • Authenticate via GitHub Device Flow
  • Register (or link) a Canary project
  • Write a local .canary config file
  • Optionally generate a GitHub Actions workflow and set secrets
  • Build and upload an initial dependency inventory

Commands

canary init

Registers a new project (or links to an existing one) and optionally sets up GitHub Actions.

canary init

canary inventory

Builds inventory from supported lockfiles. Can print a summary, output JSON, write to a file, or send to Canary.

canary inventory
canary inventory --json
canary inventory --output inventory.json
canary inventory --send
canary inventory --no-dev

canary scan

Updates inventory (if possible), triggers a scan, and prints vulnerabilities.

canary scan
canary scan --severity critical,high
canary scan --ecosystem npm
canary scan --json

canary status

Shows local project config and the last scan summary (if you have a valid session).

canary status

If you run canary with no command, it defaults to status.

Supported Lockfiles

Inventory currently supports:

  • npm: package-lock.json, yarn.lock
  • Python: requirements.txt, Pipfile.lock, poetry.lock
  • Go: go.mod, go.sum
  • Ruby: Gemfile.lock
  • Rust: Cargo.lock
  • Composer: composer.lock
  • NuGet: packages.lock.json
  • Maven: pom.xml

Configuration & Storage

  • Project config is stored in a .canary file in your repo (created by canary init).
  • Session credentials are stored at ~/.config/canary/credentials.json.
  • Project API keys are stored at ~/.config/canary/api-keys.json.

CI (GitHub Actions)

canary init can generate .github/workflows/canary-scan.yml. The workflow installs canary-cli and runs:

canary inventory --send

It expects GitHub secrets:

  • CANARY_INGEST_TOKEN (inventory ingest API key)
  • CANARY_WORKER_URL (Canary Worker base URL)

Environment Variables

  • CANARY_API_URL - Override the Canary Worker URL (alternative to --api-url)
  • CANARY_INGEST_TOKEN - API key for inventory ingestion (CI / non-interactive use)
  • CANARY_DASHBOARD_URL - Override the dashboard base URL used in links