Ctrl+Z
for your terminal.

Every interface has undo except the terminal — where you can do the most damage. oops fixes that.

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

The installer handles everything — downloads the binary, adds the shell hook, and sets up the backup directory. Just answer y/n.

~ $ rm -rf src/
▲ rm -r ~/project/src

~ $ oops
✓ Undid: rm -r ~/project/src
↩ restored ~/project/src

What it catches

oops intercepts destructive commands before they run and silently backs up the affected files. Non-destructive commands pass through with zero overhead.

CommandWhat oops doesUndo
rm / rm -rfCopies files to trash before deletionrestore
mv a bBacks up the overwrite targetrestore b
> file.txtSnapshots file before redirect overwrites itrestore
sed -iCopies file before in-place editrestore
chmod / chownRecords original permissionsrestore
git reset --hardCreates a stash before resetstash apply
git checkout .Creates a stashstash apply
git branch -DLogs the branch SHA before deletionrecreate
git clean -fdStashes untracked filesstash apply

Works with AI agents

Claude Code, Cursor, Aider, Codex — any tool that runs shell commands in your terminal goes through the same hook.

AI coding agents are getting more autonomy. They run rm, git reset --hard, and mv on your behalf — and sometimes they get it wrong. oops catches these the same way it catches your commands. If an agent deletes something it shouldn't have, type oops and it's back.

# AI agent runs a destructive command
~ $ git reset --hard HEAD~3
▲ git reset --hard

# you notice it wiped your uncommitted work
~ $ oops
✓ Undid: git reset --hard
  Applied stash: stash@{0}

Install

One command. The installer handles the binary, shell hook, and backup directory.

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

CLI reference

CommandDescription
oopsUndo the last destructive action
oops 2Undo the second-to-last action
oops logShow undo history
oops sizeShow backup disk usage
oops cleanRemove old backups (--all for everything)
oops configView or change settings
oops doctorCheck installation health
oops uninstallRemove oops from your system

Type oops. Get your files back.

Single binary, written in Go, no dependencies. ~10ms backup overhead. Auto-cleanup after 7 days. Read the docs.

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