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

cleanmyproj

v1.3.0

Published

CLI tool to clean project caches and free up local storage

Readme

English | 中文


CleanMyProj

一键清理项目缓存,释放磁盘空间

npm version npm downloads license GitHub stars

自动检测项目类型 · 扫描缓存占用 · 交互式选择 · 安全移至回收站


为什么需要 CleanMyProj

开发久了,各种 node_modules.next__pycache__target 散落在项目里,占用大量磁盘空间。手动查找和删除这些缓存目录既麻烦又容易误删。

CleanMyProj 帮你:

  • 一个命令扫描项目中所有可清理的缓存
  • 按占用大小排序,清晰展示哪些最占空间
  • 勾选后统一移至系统回收站(不是直接删除)

安装

npm install -g cleanmyproj

使用

在任意项目根目录下执行:

cmpj

典型输出

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  CleanMyProj — 项目缓存清理工具
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  项目路径: /Users/dev/my-project
  检测类型: nextjs
  框架技术: Next.js, React, TypeScript

  共发现 5 项缓存,总计占用 2.37 GB

? 选择要清理的项目 (空格勾选, Enter 确认):
 ◻ ✦ 全选 (All) — 总计: 2.37 GB
 ◻   .next (Next.js build cache)                    1.24 GB
 ◻   node_modules                                   890.52 MB
 ◻   node_modules/.vite (Vite cache)               156.30 MB
 ◻   .eslintcache                                    12.80 MB
 ◻   node_modules/.cache (Webpack/Babel)              8.45 MB

命令

cmpj                     # 当前目录:扫描 → 交互选择 → 清理
cmpj /path/to/project    # 指定项目路径
cmpj --check             # 只看结果,不执行清理
cmpj --yes               # 跳过确认直接清理(谨慎使用)

操作说明

| 按键 | 作用 | |------|------| | 空格 | 勾选 / 取消勾选 | | ↑ ↓ | 上下移动光标 | | Enter | 确认选择 |

选择后会经历两次确认

  1. 第一次 Enter → 显示将要清理的项目列表,要求确认
  2. 第二次 Enter → 最终执行,文件移至系统回收站

支持的项目类型

| 类型 | 可清理内容 | |------|-----------| | Node.js | node_modules、npm / yarn / pnpm 全局缓存、node_modules/.cache.eslintcache | | Next.js | .next 构建缓存 | | Nuxt | .nuxt.output | | Vite | node_modules/.vite | | Vue / Svelte | dist.svelte-kit | | Angular | .angulardist | | Gatsby | .cachepublic | | Python | __pycache__.venv、pip 缓存 | | Rust | target/、cargo registry | | Go | build cache、module cache | | Flutter | build/.dart_tool、pub cache | | Java | build/target/、Gradle 缓存、Maven 本地仓库 | | Docker | 未使用的镜像、容器、卷 | | Turborepo | .turbo 本地缓存 |

安全性

| 特性 | 说明 | |------|------| | 🗑️ 移至回收站 | 所有文件进入系统回收站(macOS 废纸篓 / Windows 回收站 / Linux Trash),可手动恢复 | | ☑️ 默认不选 | 所有选项默认未勾选,由你决定清理哪些 | | 🔒 双重确认 | 执行前需两次确认,防误操作 | | 🚫 不碰源码 | 仅清理缓存和构建产物,不影响源代码和配置文件 |

常见问题

可以。所有删除操作实质是「移动到回收站」,打开系统的回收站即可恢复。

支持。在 monorepo 根目录运行 cmpj,会扫描所有子项目的缓存。

不会。CleanMyProj 只会清理预定义的缓存目录(如 node_modules.nexttarget 等),不会删除任何源代码文件。

能。支持 macOS、Windows 和 Linux,文件会被移至各自的系统回收站。

贡献

欢迎提交 Issue 和 Pull Request!

  1. Fork 本仓库
  2. 创建分支 (git checkout -b feature/your-feature)
  3. 提交更改 (git commit -m 'feat: add something')
  4. 推送分支 (git push origin feature/your-feature)
  5. 提交 Pull Request

许可证

MIT © ceasarXuu