oops is in beta. Report any issues on GitHub.

Trash for the command line

May 2026

Command-line trash tools are a good idea: instead of permanently deleting a file, move it somewhere recoverable. They are much safer than raw rm for simple deletes.

Where trash helps

If your mistake is exactly "I deleted this file with rm," a trash command can make recovery easy. It also teaches a safer habit: remove files in a way that keeps a recovery path.

Where trash falls short

Many destructive terminal actions are not simple deletes. git reset --hard discards working tree changes. sed -i edits a file in place. mv can overwrite the destination. rsync --delete removes files based on another tree. A trash replacement for rm does not automatically cover those.

oops uses local trash plus restore metadata

oops backs up affected files to local trash before destructive commands run, then writes a journal entry that knows how to restore them. For git operations, it records the relevant stash or branch recovery action.

$ sed -i '' 's/old/new/g' config.yml $ oops diff $ oops ✓ restored config.yml

Install

curl -fsSL oops-cli.com/install.sh | bash

Use oops when you want command-line trash behavior plus protection for git resets, in-place edits, overwrites, redirects, and AI-agent commands.