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

clean-stack-cli

v1.0.0

Published

🧹 A powerful CLI tool to reclaim disk space by cleaning development artifacts - node_modules, build outputs, caches, Docker volumes, and more

Downloads

18

Readme

🧹 CleanStack

Reclaim disk space by cleaning development artifacts

npm version License: MIT Node.js Version

A powerful, interactive CLI tool that helps developers reclaim disk space by identifying and safely removing common development artifacts like node_modules, build outputs, caches, Docker volumes, and more.

Features β€’ Installation β€’ Usage β€’ Documentation β€’ Contributing

CleanStack Demo


✨ Features

  • 🎯 Smart Detection - Automatically finds 20+ common dev artifacts across multiple languages and tools
  • πŸ“Š Visual Interface - Beautiful, interactive TUI for easy directory selection
  • 🐳 Docker Support - Detects and cleans Docker volumes from docker-compose files
  • πŸ“ Flexible Filtering - Filter by size, depth, custom patterns, or exclude specific directories
  • πŸ›‘οΈ Safety First - Multiple validation layers to prevent accidental deletions
  • ⚑ Fast Scanning - Parallel processing for quick results even on large projects
  • 🎨 Color Coded - Category-based color coding for easy identification
  • πŸ’Ύ Size Analysis - See exactly how much space each directory uses

πŸš€ Installation

npm (recommended)

npm install -g clean-stack-cli

npx (no installation)

npx clean-stack-cli scan

Requirements

  • Node.js 18.0.0 or higher

πŸ“– Usage

Quick Start

# Scan current directory
clean-stack-cli scan

# Scan specific directory
clean-stack-cli scan ~/projects

# Scan with size filter
clean-stack-cli scan --min-size 100MB

# Include Docker volumes
clean-stack-cli scan --docker-volumes

Interactive Controls

Once scanning completes, use these keyboard shortcuts:

| Key | Action | |-----|--------| | ↑ ↓ | Navigate through list | | Space | Toggle selection | | A | Select all | | D | Deselect all | | Enter | Confirm and delete | | Q / Esc | Quit without deleting |

Command Options

clean-stack-cli scan [path] [options]

Scan a directory for cleanable artifacts.

Options:

  • --min-size <size> - Filter out directories smaller than specified size (e.g., 100MB, 1GB)
  • --max-depth <depth> - Maximum directory depth to scan (default: 10)
  • --include <patterns...> - Custom patterns to include (e.g., "build" "dist" "*.tmp")
  • --ignore <patterns...> - Patterns to ignore (e.g., "important-cache" "keep-this")
  • --docker-volumes - Include Docker volumes from docker-compose files

Examples:

# Clean up large artifacts
clean-stack-cli scan ~/projects --min-size 500MB

# Custom patterns only
clean-stack-cli scan --include "tmp" "*.backup" "old-*"

# Exclude specific directories
clean-stack-cli scan --ignore "node_modules" "important-dist"

# Docker projects
clean-stack-cli scan ~/docker-projects --docker-volumes

# Combine filters
clean-stack-cli scan --docker-volumes --min-size 1GB --max-depth 5

clean-stack-cli list

List all built-in patterns that will be scanned.

clean-stack-cli list

πŸ—‚οΈ What Gets Detected

Dependencies

  • node_modules - npm/yarn/pnpm dependencies
  • .pnpm - pnpm store
  • bower_components - Bower dependencies
  • venv, .venv, env, virtualenv - Python virtual environments

Build Outputs

  • dist, build, out - Distribution and build directories
  • .next - Next.js build output
  • .nuxt - Nuxt.js build output
  • target - Rust/Maven build output

Caches

  • .cache - Generic cache directories
  • .parcel-cache - Parcel bundler cache
  • .turbo - Turborepo cache
  • .pytest_cache, __pycache__ - Python caches
  • .eslintcache - ESLint cache

Coverage Reports

  • coverage - Code coverage reports
  • .nyc_output - NYC coverage output
  • htmlcov - Python coverage HTML reports

Infrastructure

  • .terraform - Terraform cache

Docker Volumes

When using --docker-volumes flag:

  • Local bind mounts from docker-compose files
  • Relative volume paths (e.g., ./data, ./logs)
  • Only volumes within the scanned directory

πŸ›‘οΈ Safety Features

CleanStack includes multiple safety mechanisms:

  1. Path Validation - Only deletes within the scanned directory
  2. System Directory Protection - Prevents deletion of system paths
  3. Explicit Confirmation - Requires user selection and confirmation
  4. No Symlink Following - Doesn't follow symbolic links during deletion
  5. Error Handling - Gracefully handles permission errors and continues
  6. Docker Volume Safety - Only includes existing local bind mounts

πŸ“š Documentation

πŸ”§ Development

Setup

git clone https://github.com/huantt/clean-stack-cli.git
cd cleanstack
npm install
npm link

Project Structure

cleanstack/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ scanner/       # Directory scanning and pattern detection
β”‚   β”œβ”€β”€ ui/            # Interactive terminal UI
β”‚   β”œβ”€β”€ cleaner/       # Deletion logic
β”‚   └── utils/         # Utility functions
β”œβ”€β”€ bin/               # Executable entry point
└── tests/             # Test files

Running Tests

npm test

🀝 Contributing

Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.

Areas for Contribution

  • πŸ§ͺ Testing - Help add automated tests
  • πŸ“ Documentation - Improve guides and examples
  • 🎨 UI/UX - Enhance the interactive experience
  • πŸ” Patterns - Add support for more artifact types
  • 🌍 Localization - Add multi-language support

πŸ“ License

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

πŸ™ Acknowledgments

  • Built with Commander.js for CLI framework
  • Powered by Ink for beautiful terminal UIs
  • Uses fast-glob for efficient file scanning

πŸ“Š Statistics

  • 20+ patterns detected out of the box
  • 5 categories (dependencies, build, cache, coverage, infrastructure)
  • Docker support for containerized projects
  • Zero config needed to get started

🌟 Star History

If you find CleanStack useful, please consider giving it a star on GitHub!


Made with ❀️ by developers, for developers

Report Bug β€’ Request Feature β€’ Documentation