This guide will help you get started with npq quickly.
npm install -g npqOr via Homebrew:
brew install npq# Audit and install a package
npq install expressnpq will:
# Audit without installing
npq install express --dry-runThis runs all security checks but doesn't install the package. Useful for:
package.json# Plain text output (no colors/formatting)
npq install express --plainUseful for:
Install npq globally:
npm install -g npqTry auditing a package:
npq install express --dry-runReview the output:
Install if audit passes:
npq install expressCreate an alias to automatically audit all package installations:
# For npm - add to ~/.bashrc or ~/.zshrc
alias npm='npq-hero'
# For yarn
alias yarn="NPQ_PKG_MGR=yarn npq-hero"
# For pnpm
alias pnpm="NPQ_PKG_MGR=pnpm npq-hero"Now all npm install commands are automatically audited before installation.
Usage: npq install <package> [options]
Commands:
install [package...] Install one or more packages after auditing
Options:
--dry-run Run checks only, don't install
--plain Force non-rich text output
--packageManager Package manager to use (default: npm)
--pkgMgr Alias for packageManager
--disable-auto-continue Disable auto-continue countdown, always prompt
-h, --help Show help
-v, --version Show versionnpq install express lodash axiosnpq install express@4.18.2
npq install lodash@^4.17.21npq install express --packageManager=yarnOr via environment variable:
NPQ_PKG_MGR=yarn npq install expressnpq install express --disable-auto-continueThis always prompts for explicit confirmation, even when only warnings are detected.