AI Agent Hub
Back to plugins
⚙️

dsh-rewind

Workflow Updated 2026.09.16

Run the following command in DeepSeek Harness:

dsh plugin install liyixuan201211/dsh-rewind

Paste the following prompt into your AI chat to install this plugin:

Find dsh-rewind (source: https://github.com/liyixuan201211/dsh-rewind) in the DeepSeek Harness plugin registry and run dsh plugin install liyixuan201211/dsh-rewind to install it; once loaded, the agent learns to snapshot before risky changes, wrap commands with rewind exec, and prefer undo --dry-run to undo --yes over reaching for undo directly.

About this plugin

After an agent mass-rewrites forty files, overwrites your .env, or deletes a script that was never tracked by git, there is no Ctrl+Z in the terminal, and git checkout . only knows about the last commit — an hour of working-tree changes are invisible to it. dsh-rewind fills exactly that gap: it takes a content-addressed snapshot of any directory (repo or not), then one command rewinds you to minutes ago, no commit, no stash, no timestamp to remember.

The core design principle is one sentence: the undo is itself undoable. Before every undo touches a file, the current state is snapshotted and its id printed; change your mind and rewind to that id. Safety boundaries are equally firm — no recursive deletion, no removal of any file the snapshot never captured, all writes go through a temp file and atomic rename, symlinks are recorded but never followed. Zero dependencies, plain Node ESM, the store lives in .rewind/ inside the same directory you can inspect with ls, and it introduces no new boot-time side effects.

Who it is for is clear: developers who work daily with AI coding agents and run frequent batch codemods or bulk file rewrites. It is not a backup; it does not protect against a dead disk. The granularity is per-directory, immediate, same-volume rollback, stored as plaintext files you can inspect directly. No remote repository, no encryption config, no lifecycle scripts. The need is narrow by design: reverse the last five minutes of damage in one command, and that reversal can itself be reversed.

Use Cases

  • One-command rollback after an agent mass-edits files across a project
  • Restoring accidentally deleted untracked files in a non-git directory
  • Reverting a bulk codemod to an exact pre-run snapshot by id

Best For

  • Developers who work daily with AI coding agents and trigger frequent bulk file rewrites
  • Engineers working in non-repo directories who need instant, reversible operations
  • Users who want a zero-dependency local tool to replace git stash and cp -r for immediate rollback