user@undo.sh: ~/sessions/main — tmux 3.4
[0] 0:bash* 1:vim 2:logs
undo --interactive [running] PID 4419
user@undo.sh:~$
   __ _ _              _
  / _` | |__   ___  _ _| |_
 | (_| | '_ \ / _ \| | | | __|
  \__,_|_.__/ \___/ \_,_|\__|
                            

// what is undo.sh ?

undo.sh is a command, a philosophy, and a "second chance" rendered as a shell script.

It rewinds your last action --steps=1, --depth=infinite, with no questions asked. No stack trace. No regrets.

# tl;dr -- ctrl-z, but for everything you ever did

--maintainer root@undo.sh
--license "MIT (with regret clause)"
--version "1.0.0-stable"
user@undo.sh:~$
   ___ _ __ ___  _ __ ___  _ __ ___   __ _ _ __   __| |___
  / __| '_ ` _ \| '_ ` _ \| '_ ` _ \ / _` | '_ \ / _` / __|
 | (__| | | | | | | | | | | | | | | | (_| | | | | (_| \__ \
  \___|_| |_| |_|_| |_| |_|_| |_| |_|\__,_|_| |_|\__,_|___/
                            

// available primitives -- pick one and run

  • $ undo --last # revert the last operation, atomically
  • $ undo --steps "3" # walk three steps back through history
  • $ undo --commit HEAD~1 # surgical revert of a single commit
  • $ redo --force # reapply the most recent undo
  • $ undo --life # not implemented (yet)
// loading manpage…
install.sh 92%
undo 100%
redo 78%
user@undo.sh:~$
UNDO(1)                User Commands                UNDO(1)

NAME
       undo — reverse the last operation, gracefully.

SYNOPSIS
       undo [--steps N] [--commit REF] [--force]
            [--dry-run] [--verbose]

DESCRIPTION
       undo is a small, opinionated tool that rewinds the last
       N operations on the current working tree. It is designed
       to be safe by default and noisy on demand.

OPTIONS
       --steps N      go back N steps. defaults to "1".
       --commit REF  rewind a specific commit reference.
       --force        skip confirmation prompts. handle with care.
       --dry-run      preview the operation without applying it.
       --verbose      print every action to stdout.

EXIT STATUS
       0   success
       1   nothing to undo
       2   conflict in working tree
       42  philosophical impossibility

SEE ALSO
       redo(1), commit(1), regret(7)
                            
user@undo.sh:~$
       _                            _
   ___| |__   __ _ _ __   __ _  ___| | ___   __ _
  / __| '_ \ / _` | '_ \ / _` |/ _ \ |/ _ \ / _` |
 | (__| | | | (_| | | | | (_| |  __/ | (_) | (_| |
  \___|_| |_|\__,_|_| |_|\__, |\___|_|\___/ \__, |
                         |___/              |___/
                            
  • v1.0.0 // 2026-04-12 first stable release. ctrl-z, but with confidence.
  • v0.9.4 // 2026-03-29 fix: "undo --life" now panics with dignity.
  • v0.9.0 // 2026-02-14 add: --dry-run and pretty diff output.
  • v0.8.2 // 2026-01-30 fix: typo in error code 42.
  • v0.7.0 // 2025-12-08 add: tmux-style split panes for verbose mode.
  • v0.5.1 // 2025-10-22 add: redo, eventually.
  • v0.1.0 // 2025-08-04 initial commit. it does not, in fact, undo.
user@undo.sh:~$
// session: 2026-05-01T09:14:21Z -- replay attached

$ echo "oops" > report.txt
// wrote 4 bytes to report.txt

$ rm important_data.csv
!! removed -- 8.4 MB

$ undo --last
// scanning history (1 ops)…
[ok] restored important_data.csv — sha a3f1e9c

$ undo --steps "2" --dry-run
// preview only -- no changes will be applied
~ would revert: report.txt
~ would revert: .bash_history#42

$ redo --force
// re-applying the last undo…
[ok] redo complete in 12ms
                            
user@undo.sh:~$
   ___ ___  _ __ | |_ __ _  ___| |_
  / __/ _ \| '_ \| __/ _` |/ __| __|
 | (_| (_) | | | | || (_| | (__| |_
  \___\___/|_| |_|\__\__,_|\___|\__|
                            

// reach the maintainer -- pgp encouraged

  • --mail root@undo.sh
  • --git git://undo.sh/undo.git
  • --irc irc.undo.sh #undoers
  • --pgp "0xDEADBEEF 1A2B 3C4D"

# patches welcome. flames will be undone.

user@undo.sh:~$