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

depclear-cli

v0.1.0

Published

Find unused and missing dependencies in your Node.js project. Zero-dependency, CI-friendly, low false positives.

Readme

depclear

Find unused and missing dependencies in your Node.js project. Zero-dependency, CI-friendly, low false positives.

License: MIT Node

depclear is the maintained successor to the abandoned depcheck (archived June 2025, 1.4M+ weekly downloads) for simple projects — without the complexity of knip. It statically analyzes your source, config files, and npm scripts to find:

  • Unused — dependencies declared in package.json but never referenced
  • Missing — packages referenced in code but not declared

Why another tool?

depcheck was archived in June 2025. It still gets 1.4M+ weekly downloads because nothing simple replaced it. knip is excellent but TypeScript-heavy, monorepo-focused, and needs configuration. If you have a plain Node.js project and just want to know what's unused and what's missing — with zero setup and zero dependencies — this is that tool.

Why low false positives

The #1 complaint about dependency scanners is false positives from legitimate usage the analyzer doesn't understand. depclear handles the cases that break naive scanners:

| Usage | Handled | |-------|---------| | require('x'), import x from 'x', import('x'), export ... from 'x' | ✅ | | Subpath imports (pkg/sub/path) | ✅ | | Scoped packages (@scope/pkg) | ✅ | | Node built-ins (fs, path, node:http) | ✅ (never flagged) | | CLI tools invoked in npm scripts ("build": "webpack") | ✅ | | Plugins/loaders in config files (webpack, jest, eslint, babel, tailwind, vite, rollup, next) | ✅ | | @types/* packages | ✅ (only flagged when TS files present) | | Dynamic requires (require(var)) | ⚠ known limitation |

Install

# Use immediately
npx depclear-cli

# Install globally
npm install -g depclear-cli

# Add as dev dependency
npm install --save-dev depclear-cli

Zero runtime dependencies. Node.js 18+.

Usage

# Check the current directory
depclear

# Check a specific directory
depclear ./my-app

# Machine-readable output
depclear --json

# One-line summary for CI
depclear --summary

# Skip devDependencies
depclear --no-dev

Exit codes (CI-friendly)

| Code | Meaning | |------|---------| | 0 | No issues found | | 1 | Issues found (unused or missing dependencies) | | 2 | Error (package.json not found, invalid arguments) |

Example output

depclear — ./my-app
──────────────────────────────────────────────────
Scanned 47 files · 12 packages used
✗ 2 unused dependencies:
  dependencies:
    • moment
    • request
⚠ 1 missing dependency:
  (used in source but not listed in package.json)
    • axios
──────────────────────────────────────────────────
Found: 2 unused, 1 missing

CI integration

# GitHub Actions
- name: Check dependencies
  run: npx depclear --summary
{
  "scripts": {
    "check-deps": "depclear",
    "check-deps:ci": "depclear --summary"
  }
}

API

const { scan } = require('depclear');
const result = await scan('/path/to/project');
// { unused: [{ name, category }], missing: [...], summary: {...} }

Development

npm test   # 11 tests, zero test deps

License

MIT © Faizan