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

@jacobjoergensen/preflight

v1.1.0

Published

CLI tool that validates project dependencies before you run into problems

Readme

PreFlight

A CLI tool that validates your project dependencies before you run into problems. Checks if everything is installed, fixes what's missing, and runs security audits across package managers.

Install

Go Install:

go install github.com/JacobJoergensen/preflight@latest

NPM Install:

npm install -g @jacobjoergensen/preflight

Or download it from releases.

Get Started

# Check if dependencies are installed
preflight check

# Fix missing dependencies
preflight fix

# Run security audits
preflight audit

Commands

check

Validates that all required dependencies are installed.

preflight check
preflight check --pm=npm,composer
preflight check --scope=js,go
preflight check --with-env

| Flag | Description | |------|-------------| | --pm, -p | Package managers to check (npm, yarn, pnpm, bun, composer, go, pip, bundle) | | --scope | Scopes to check (js, php, composer, node, go, python, ruby, env) | | --with-env | Also validate .env against .env.example | | --outdated | Also check for outdated packages | | --timeout, -t | Timeout duration (default: 5m) | | --json | Output as JSON |

fix

Installs missing dependencies.

preflight fix
preflight fix --pm=npm
preflight fix --dry-run
preflight fix --force

| Flag | Description | |------|-------------| | --pm, -p | Package managers to fix | | --scope | Scopes to fix | | --force, -f | Force reinstall | | --dry-run | Show what would run without executing | | --skip-backup | Skip lockfile backup | | --timeout, -t | Timeout duration (default: 30m) | | --json | Output as JSON |

audit

Runs native security scanners for each ecosystem.

preflight audit
preflight audit --scope=js,composer
preflight audit --json

| Scope | Tool | |-------|------| | js | npm/pnpm/yarn/bun audit | | composer | composer audit | | go | govulncheck | | python | pip-audit | | ruby | bundle-audit |

| Flag | Description | |------|-------------| | --pm, -p | Package managers to audit | | --scope | Scopes to audit | | --timeout, -t | Timeout duration (default: 30m) | | --json | Output as JSON |

list

Lists all dependencies for the project.

preflight list
preflight list --pm=composer,go

| Flag | Description | |------|-------------| | --pm, -p | Package managers to list | | --scope | Scopes to list | | --outdated | Show outdated packages with version info | | --json | Output as JSON |

run

Runs a named script from preflight.yml.

preflight run test
preflight run build --dry-run

| Flag | Description | |------|-------------| | --dry-run | Print command without running | | --timeout | Timeout duration (default: 30m) |

hooks

Manages Git pre-commit hooks.

preflight hooks install
preflight hooks install --force
preflight hooks install --command "preflight check --with-env"
preflight hooks remove

| Flag | Description | |------|-------------| | --force | Append to existing hook without PreFlight markers | | --command | Custom command to run (default: preflight check) |

init

Generates preflight.yml from detected project manifests.

preflight init
preflight init --force

| Flag | Description | |------|-------------| | --force | Overwrite existing file |

Global Flags

These work with any command:

| Flag | Description | |------|-------------| | --profile | Use specific profile from preflight.yml | | --quiet | Suppress non-essential output | | --no-color | Disable colored output | | --no-emoji | Disable emoji output |

Configuration

Create preflight.yml in your project root, or run preflight init to generate one.

version: 1
profile: default

profiles:
  default:
    check:
      pm: [npm, composer]
      withEnv: true
    fix:
      pm: [npm, composer]
    audit:
      minSeverity: high  # ignore info, low, moderate
    run:
      scripts:
        test:
          js: "npm test"
        build:
          js: "npm run build"

  ci:
    check:
      scope: [js, composer, go]
    audit:
      minSeverity: critical  # only fail on critical

Profile Resolution

Priority (highest wins):

  1. --profile flag
  2. PREFLIGHT_PROFILE environment variable
  3. profile: field in preflight.yml
  4. default

Scripts

Each script targets exactly one package manager:

run:
  scripts:
    test:
      js: "npm test"           # runs: npm test
    lint:
      composer: "phpstan"      # runs: composer phpstan
    vet:
      go: "go vet ./..."       # runs: go vet ./...
    spec:
      ruby: "rspec"            # runs: bundle exec rspec
    check:
      python: "pytest"         # runs: poetry run pytest (or pip)

Scopes vs Package Managers

Use --scope for categories, --pm for specific tools.

| Scope | Package Managers | |-------|------------------| | js | npm, yarn, pnpm, bun | | composer | composer | | go | go | | python | pip, poetry, uv | | ruby | bundle | | php | (runtime check only) | | node | (runtime check only) | | env | (.env validation) |

You can use either --scope or --pm, not both.

Supported Ecosystems

| Ecosystem | Runtime | Package Managers | |-----------|---------|------------------| | JavaScript | Node.js | npm, yarn, pnpm, bun | | PHP | PHP | Composer | | Go | Go | Go modules | | Python | Python | pip, Poetry, uv | | Ruby | Ruby | Bundler |

License

This project is licensed under the MIT License - see the LICENSE file for details.