del-cli
Cross-platform command-line tool to delete files and directories with glob support
Repository Health
Technical Analysis
del-cli is a small cross-platform command-line tool for deleting files and directories, built on the del library. It is designed for build scripts and automation where you need a reliable, portable alternative to rm -rf or the rimraf CLI.
It supports glob patterns (even on Windows), a dry-run mode that lists what would be removed without touching anything, and a safer-by-default policy that refuses to delete parent or working directories unless explicitly forced.
What You Get
- A
del/del-clibinary for deleting paths from the command line - Glob pattern matching, including negation, that works on Windows too
- A
--dry-runmode to preview deletions safely - Safe-by-default guards against deleting parent/working directories
- A
--verboseflag to print absolute paths as items are removed
Common Use Cases
- Cleaning build/output directories in npm scripts
- Removing generated artifacts in CI pipelines cross-platform
- Deleting files by glob pattern without shell-specific behavior
- Replacing rimraf or rm -rf with a safer, portable command
Under The Hood
Architecture - The tool is a single cli.js entry point that parses arguments with meow and forwards the resolved paths and options to the del library, which performs the actual glob resolution and filesystem deletion. Error output is formatted via presentable-error.
Tech Stack - Node.js CLI (ESM), depending on del for deletion, meow for argument parsing, and presentable-error for friendly errors. Distributed on npm with del and del-cli bin aliases.
Code Quality - The codebase is intentionally tiny — a CLI file plus a test.js suite — following sindresorhus’s conventions with a focused, single-responsibility design and an accompanying test file.
API Design - The command surface is minimal and self-explanatory: pass paths or globs, optionally with --force, --dry-run, or --verbose. The --help output documents everything, and safe defaults (no parent-directory deletion) protect against foot-guns.
Used by 4 apps in this directory
Artillery
Devops · Developer Tools
Cloud-scale load testing and functional testing for APIs, WebSockets, gRPC, and headless browsers, distributed across AWS Lambda or Fargate with zero infrastructure to manage.
Omnivore
Knowledge Management · Bookmarks Archiving · Note Taking
Self-hosted read-it-later platform with highlights, newsletters, PDFs, and seamless Obsidian and Logseq integration.
OpenReplay
Analytics
Self-hosted session replay and product analytics suite that lets you see exactly what users do on your web app — without sending data to third parties.
Unleash
Developer Tools · Devops · Ab Testing Experimentation
The open-source feature management platform that lets you ship code to production and control who sees it — without redeploying.