sona-clean Open Source CLI Tool
Overview
sona-clean is a CLI tool I built to reclaim wasted disk space across local development workspaces.
Scanning my projects folder revealed over 35 GB of generated folders like node_modules, dist, .next, and build. The standard cleanup flow was fragmented, relying on manual inspection or one-off commands that scaled poorly. I needed a lightweight tool to clearly answer what generated folders existed, how much space they took, and what could be cleaned safely.
Design and Engineering
The CLI scans a root directory, measures reclaimable space, and groups results by project. Built in TypeScript, the codebase strictly separates scanning, sizing, and cleaning logic into focused modules.
Clarity and safety guided the design. Adding custom folder targeting made the tool more useful but also more dangerous, requiring strict guardrails. It blocks broad root deletions, refuses dangerous folder names, ignores symlinks, and requires typed confirmation for custom cleanup. For a cleanup utility, trust matters more than features.
Outcome
sona-clean remains a focused open source tool that does exactly one job: helping developers reclaim space from reproducible folders without making cleanup careless.
It combines CLI design, filesystem performance, and safety constraints into a single compact project.