---
title: "wdmt"
description: "Secure and robust way to clean up your clutter caused by having too much files in your System Data."
canonical_url: "https://neg4n.dev/projects/wdmt"
md_url: "https://neg4n.dev/projects/wdmt.md"
---

# wdmt

## Resources

- [GitHub](https://github.com/neg4n/wdmt)
- [Preview](/projects/wdmt/preview.md)

## README

IntroductionWDMT /ˌwɪdiˈɛmˈtiː/ (Web Developer Maintenance Tool) is a CLI that securely removes bulky development artefacts such as node_modules, .next, or dist. It focuses on correctness and safety, ensuring that no file outside the intended directory tree is ever touched.MotivationHave you ever seen 200GB+ taken by the System Data on your Mac?Large dependency folders and build outputs quickly bloat local check-outs.  Manually pruning them with rm -rf or similar commands is risky-one wrong path or an unexpected symlink can wipe unrelated data.WDMT gives developers a fast and interactive way to reclaim disk space without compromising security.Key Features🔒 Symlink Attack Prevention — Never follows malicious symlinks🛡️ Path Traversal Protection — Blocks ../../../etc/passwd style attacks⚡ Interactive Selection — Smart path display with multiple view modes📊 Progress Visualisation — Beautiful progress bars created using charmbracelet libraries🎯 Secure by Design — Robust security validation📱 Cross-Platform — Works on macOS, Linux, and Windows🔍 Enhanced Path Display — Smart, condensed, and full path viewing modes with keyboard shortcuts📏 Accurate Size Calculation — Uses 4KB block size to match actual disk usage🚀 Zero Configuration — Works out of the box with sensible defaults, no config files neededBuilt WithCobra — CLI framework for building commandsBubble Tea — Terminal UI frameworkLipgloss — Terminal styling and layoutBubbles — TUI components (lists, progress bars, spinners)Quick StartInstallationgo install github.com/neg4n/wdmt@latestorcurl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/neg4n/wdmt/main/install.sh | shUsageLaunch your preferred terminal emulatorNavigate to the directory you want to clean up (e.g. ~/projects if you keep all your programming projects there)Run wdmt in the terminalFollow the interactive prompts to select and delete directoriesInteractive ControlsDuring the selection phase:↑/↓ or j/k — Navigate through the listSpace or Enter — Select/deselect itemsa — Select all itemsA — Deselect all itemsp — Cycle through path display modes (smart → condensed → full)? — Toggle helpq or Ctrl+C — QuitDuring deletion:Any key — Skip the 5-second completion delaySecurity ArchitectureWDMT uses a two-phase security model optimized for both performance and safety:Discovery Phase (Scanner)🔍 Fast & Minimal Security — Essential symlink detection for safe directory traversal⚡ Performance Optimized — Parallel scanning with CPU×3 workers for fast discovery👀 User Review Required — Always displays confirmation screen before deletionDeletion Phase (Cleaner)🛡️ Full Security Suite — Complete protection when it matters mostFeatureTraditional toolsWDMT ScannerWDMT CleanerSymlink safetyOften follows symlinksEssential detectionNever follows symlinksPath validationBasic checksBasic boundary checksMulti-layer validationInjection protectionNoneN/A (user review)UTF-8 & null-byte filteringRace-condition defenceVulnerableN/A (user review)Just-in-time validationFilesystem boundariesCan cross devicesN/A (user review)Device-ID tracking[!IMPORTANT]The scanner prioritizes speed for discovery, while the cleaner enforces complete security during deletion. Always review the confirmation screen to verify what you're deleting, as this is your primary defense against accidental deletions.Supported TargetsWDMT detects and cleans the following artefacts:TypeDirectoriesNode.jsnode_modulesBuild outputdist, build, .outputFramework cache.next, .nuxt, .vite, .turboTest coveragecoverage, .nyc_output, lib-covBundler cache.parcel-cache, .webpack, .rollup.cacheTemporarytmp, temp, .cacheSystem files.DS_Store, Thumbs.db[!NOTE]Target directories are currently hardcoded for security and simplicity but will be configurable in future releases.DevelopmentRunning Tests# All tests
go test ./...

# Security tests with coverage
go test ./internal/cleaner -v -cover[!TIP]All security tests run in isolated temporary directories to avoid touching real data.ComparisonToolSecurityInteractiveCross-PlatformWDMT✅ Robust✅ Modern UI✅ Go-basedrimraf❌ Basic❌ No✅ Node.jsrm -rf❌ Dangerous❌ No⚠️ Unix onlynpkill⚠️ Limited✅ Yes✅ Node.jsLicenseThe MIT License
