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

devcleaner

v2.0.1

Published

A simple development cleaning script

Readme

DevCleaner 🧹

A powerful, type-safe CLI tool to keep your development environment clean by removing temporary files, logs, caches, and empty directories.

DevCleaner helps you reclaim disk space and maintain a tidy codebase by intelligently scanning and deleting unwanted artifacts. Migrated to TypeScript, it provides robust safety guards, a dry-run mode, and flexible configuration options.

🚀 Key Features

  • 🛡️ Safety First: Defaults to Dry-Run mode. You must explicitly use --force to delete.
  • 🏗️ TypeScript Powered: Fully typed logic for better reliability and performance.
  • ⚙️ Configurable: Define custom patterns for files and folders via cleaner-config.json.
  • 🧠 Smart Exclusions: Automatically protects critical directories like node_modules, .git, and dist.
  • ⚡ ESM Native: Built using modern Node.js ECMAScript Modules.
  • 💬 Interactive Confirmation: Prompts you before deletion (unless -y is used).

📦 Installation

# Run directly without installation
npx devcleaner
# or
pnpm dlx devcleaner
# or
bunx devcleaner

# Or install globally
npm install -g devcleaner
yarn global add devcleaner
pnpm add -g devcleaner
bun add -g devcleaner

🛠 Usage

Basic Usage (Dry Run)

By default, DevCleaner lists what would be deleted. It will not touch your files yet.

clean
# or if running from source
npm start
# or
yarn start
# or
pnpm start
# or
bun start

Deleting Files

To perform an actual cleanup, use the --force flag.

Interactive Mode (Requires confirmation):

clean --force

Silent Mode (No prompts):

clean --force --yes

Advanced Options

| Option | Alias | Description | Default | | :--- | :--- | :--- | :--- | | --dry-run | | List candidates without deleting (default). | true | | --force | -f | Enables actual deletion. | false | | --yes | -y | Skips confirmation prompts. | false | | --dirs <list> | | Comma-separated paths to scan (e.g., src,test). | . | | --config <path>| -c | Path to custom cleaner-config.json. | ./cleaner-config.json | | --scan-all | | Include node_modules and .git in scan. | false | | --verbose | | Enable detailed log output. | false |


🔧 Configuration

Create a cleaner-config.json in your project root to customize scanning behavior.

Configuration Schema

| Field | Description | | :--- | :--- | | directoriesToScan | Array of entry points for the scan (e.g., ["src"]). | | filePatternToDelete | Glob patterns for files to remove (e.g., ["**/*.log"]). | | folderToDeleteByName| Recursive folder names to clean (e.g., ["logs"]). | | fileExclusions | Specific files to always protect. | | folderExclusions | Specific directories to always skip. |

Example cleaner-config.json

{
  "directoriesToScan": ["."],
  "filePatternToDelete": ["**/*.tmp", "**/*.log", "**/*lock.json"],
  "folderToDeleteByName": ["temp", "logs"],
  "fileExclusions": ["package.json", "tsconfig.json"],
  "folderExclusions": ["node_modules", ".git", "dist"]
}

🛠 Development

DevCleaner is built with TypeScript and Jest.

# Install dependencies
npm install   # or yarn, pnpm install, bun install

# Build the project
npm run build # or yarn build, pnpm build, bun run build

# Run tests (Experimental ESM mode)
npm test      # or yarn test, pnpm test, bun test

📄 License

MIT License.