VibeHunt
Back to browse

trash-cli

Move files and directories to the trash.

Source

The tool provides a command‑line interface for moving files and directories to the system trash instead of permanently deleting them. It works on macOS (10.12+), Linux and Windows (8+), accepting individual paths or glob patterns, with options to match dotfiles and to output verbose information about the items being trashed. By routing deletions through the operating system’s recycle mechanism, the operation becomes reversible and safer than using the traditional `rm` command.

Typical users are developers and system administrators who prefer a quick, scriptable way to discard files without risking data loss. The utility can be installed globally via npm and invoked as `trash`, with examples such as `trash unicorn.png` or `trash '*.png' '!unicorn.png'`. An optional alias (`alias rm=trash`) can replace the default `rm` command in shell configuration files to encourage safer habits.

The package is marked as stable and includes core CLI availability, making it suitable for inclusion in automation scripts or interactive shell sessions where a reliable, cross‑platform trash operation is needed.

Reviews

Sign in to leave a review.

Loading reviews…

Similar apps