FAQ

Can you undo rm in the terminal?
Not by default — rm permanently deletes files. With oops installed, files are backed up automatically before rm runs. Type oops to restore.
Can you undo rm -rf?
Without oops, no. With oops, it backs up the entire directory tree using hard links (instant, no extra disk space) and restores with one command.
Is there a Ctrl+Z for the terminal?
Not built into any shell. oops adds this with a shell hook that watches for destructive commands and lets you undo by typing oops.
How do I undo git reset --hard?
Without oops: git reflog might help for committed changes, but uncommitted work is gone. With oops: it stashes your changes before the reset. Type oops to apply the stash.
How do I recover a file after sed -i?
sed -i edits in place with no backup. If it's in git, try git checkout. With oops, the file is copied before the edit runs.
Does oops slow down my terminal?
No. Safe commands have zero overhead — no subprocess spawned. Destructive commands take ~10ms to back up.
How much disk space does oops use?
Minimal. Hard links don't use extra space until the original is deleted. Auto-cleanup after 7 days, 5GB cap. Configurable via oops config.
Does oops work with AI coding agents?
Yes. Claude Code, Cursor, Aider, Codex — any tool that runs shell commands goes through the same hook.
What shells and platforms?
zsh, bash, and fish on macOS and Linux. Single Go binary, no dependencies.
What commands does oops catch?
rm, rm -rf, mv overwrites, sed -i, chmod, chown, git reset --hard, git checkout ., git branch -D, git clean -fd, redirects (> file), truncate.
Can you undo a command in the terminal?
No shell has built-in undo. Ctrl+Z suspends a process, it doesn't undo anything. oops adds real undo by backing up files before destructive commands and restoring them on demand.
How to recover a deleted file on Mac terminal?
rm bypasses the Trash entirely. Recovery tools like testdisk may help but are unreliable on SSDs. Install oops to prevent this — it backs up files before rm runs.
How to undo git checkout?
git checkout . discards all uncommitted changes permanently. oops creates a stash before it runs. Type oops to apply the stash.
How to undo sed -i?
sed -i edits in place with no backup. The original is gone unless tracked by git. oops copies the file before sed -i runs.
How to protect files from AI coding agents?
AI agents like Claude Code and Cursor run shell commands on your behalf. oops catches these through the same shell hook. If an agent deletes something, type oops.
How do I uninstall?
Run oops uninstall, then sudo rm /usr/local/bin/oops.