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

@ervan0707/cleard

v1.0.3

Published

Interactive, multi-ecosystem build-artifact disk reclaimer (npkill, but for everything)

Readme

cleard

crates.io npm PyPI GitHub release CI License: MIT

npkill, but for everything — an interactive terminal tool that finds regenerable build / dependency / cache directories across many ecosystems and lets you delete them to reclaim disk space.

It recursively scans a directory, streams matches into a live list sorted by size, and deletes the ones you pick — with a running total of space reclaimed.

Why it's safe

Unlike a plain name match, cleard is marker-aware: an ambiguous directory is only flagged when its project marker is a sibling. target/ is only a candidate when a Cargo.toml (or pom.xml) sits next to it; a hand-written build/ source folder with no build-system marker is left untouched. Unambiguous names (node_modules, __pycache__, .terraform, …) need no marker.

Deletion is bounded to the scan root and always asks for confirmation.

Supported out of the box

Node (node_modules, .next, .nuxt, .svelte-kit, .turbo), Rust (target), Java/Gradle/Maven (build, .gradle, target), Python (.venv, venv, __pycache__, .pytest_cache, .mypy_cache, .ruff_cache, *.egg-info), Go & PHP (vendor), .NET (bin, obj), CocoaPods (Pods), Terraform (.terraform), Elixir (_build, deps), Elm (elm-stuff), Dart/Flutter (.dart_tool). Extendable via config.

Install

cleard ships one binary through whichever ecosystem you already use — npm, PyPI, and the curl script all deliver the same prebuilt binary; Cargo and Nix build from source.

cargo install cleard                       # crates.io (compiles from source)
npm install -g @ervan0707/cleard           # prebuilt binary via npm
pip install cleard                         # prebuilt binary in a Python wheel
curl -fsSL https://raw.githubusercontent.com/ervan0707/cleard/main/install.sh | bash
nix profile install github:ervan0707/cleard

Run

With Nix flakes, run it straight from GitHub (nothing to clone, no Rust needed):

# run once against a directory
nix run github:ervan0707/cleard -- ~/code

# run the current directory
nix run github:ervan0707/cleard

# pin a tag/branch/commit
nix run github:ervan0707/cleard/v0.1.0 -- ~/code

Install it into your profile:

nix profile install github:ervan0707/cleard
cleard ~/code

Binary cache (skip the build)

CI publishes prebuilt outputs to Cachix, so you can download the binary instead of compiling Rust. The flake advertises the cache via nixConfig, which Nix uses automatically if you're a trusted user. Otherwise, opt in once:

cachix use skinnyvans

Or add it to your Nix config by hand:

substituters = https://skinnyvans.cachix.org
trusted-public-keys = skinnyvans.cachix.org-1:sgaZPgRhzsU4YScjc2U5Imc+4E3y9Ov/G/q8p/csX+o=

Or add it to your own flake:

{
  inputs.cleard.url = "github:ervan0707/cleard";
  # then use cleard.packages.${system}.default in your outputs
}

Don't have Nix? Build from source with Cargo:

git clone https://github.com/ervan0707/cleard
cd cleard
cargo build --release   # binary at ./target/release/cleard

Usage

cleard                 # scan the current directory
cleard ~/code          # scan a specific directory
cleard --dry-run       # show what would be reclaimed, delete nothing
cleard --min-size 100M # hide candidates smaller than 100 MiB
cleard -x .git -x dist # skip directories by name

Keys

| Key | Action | | --- | --- | | /k, /j | move cursor | | g / G | top / bottom | | space | toggle selection | | a / c | select all / clear selection | | d / Del | delete selected (or focused) | | Enter | delete focused | | s | cycle sort (size / age / path) | | / | filter by path or ecosystem | | ? | help | | q | quit |

Config

Optional, at ~/.config/cleard/config.toml (or pass --config <path>). Use it to add your own detection rules, or to replace the built-in catalog entirely. If the file doesn't exist, the built-in rules are used.

Each rule has:

  • ecosystem — the label shown in the list.
  • dir_names — directory names to match.
  • markers — sibling files that must exist for a match. With markers, the dir is only flagged when one sits next to it (so a hand-written zig-out/ with no build.zig is left alone). Omit markers to match the name anywhere ("safe by name") — only do that for unambiguous names.

dir_names and markers accept a single * glob (e.g. *.csproj, *.egg-info). Your rules are checked before the built-ins, so they win on overlapping names.

Add a few ecosystems on top of the built-ins:

# use_default_rules = true   # default; keep the built-in catalog

[[rules]]
ecosystem = "Zig"
dir_names = ["zig-cache", "zig-out"]
markers = ["build.zig"]

[[rules]]
ecosystem = "Bazel"
dir_names = ["bazel-bin", "bazel-out", "bazel-testlogs"]
markers = ["WORKSPACE", "WORKSPACE.bazel", "MODULE.bazel"]

[[rules]]
ecosystem = "CMake"
dir_names = ["CMakeFiles"]   # unambiguous name, no marker needed

Or replace the built-ins entirely and clean only what you list:

use_default_rules = false

[[rules]]
ecosystem = "Node"
dir_names = ["node_modules"]

[[rules]]
ecosystem = "Rust"
dir_names = ["target"]
markers = ["Cargo.toml"]

Develop (Nix)

nix develop          # dev shell with the pinned Rust toolchain + rust-analyzer
cargo run -- ./path
cargo test

nix build            # build the release binary -> ./result/bin/cleard
nix run . -- ~/code  # build and run

(With direnv, direnv allow loads the dev shell automatically.)

License

MIT