explaingit

unsavededits/rewind-properly

Analysis updated 2026-05-18

0ShellAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

Git hooks that make Cursor's checkpoints and Claude Code's rewind also undo terminal command changes, not just direct file edits.

Mindmap

mindmap
  root((rewind-properly))
    What it does
      Journals every agent turn
      Full restore including terminal changes
      Backs up discarded state
    Tech stack
      Shell
      Python
      Git
    Use cases
      Complete checkpoint restores
      Clean commit history
      Safe use on real codebases
    Audience
      Cursor users
      Claude Code users
    Notes
      MIT licensed
      macOS and Linux only
      Tested on Cursor 3.10 and Claude Code 2.1

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Make Claude Code's rewind or Cursor's checkpoint button also revert files changed by terminal commands.

USE CASE 2

Automatically journal every AI agent turn as a commit so nothing is lost between checkpoints.

USE CASE 3

Squash messy AI-generated commits into clean history before pushing with a slash command.

USE CASE 4

Safely use AI coding agents on real company codebases with built-in merge and bloat protections.

What is it built with?

ShellPythonGit

How does it compare?

unsavededits/rewind-properly123satyajeet123/bitnet-serveradeilsonrbrito/cross-model-consult
Stars000
LanguageShellShellShell
Setup difficultymoderateeasymoderate
Complexity3/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires running an install script and, for Cursor, manually pasting rules into user settings.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

rewind-properly fixes a gap in two popular AI coding tools: Cursor's checkpoint button and Claude Code's rewind feature. Both tools only track changes made through their own file-editing commands. If the AI agent instead runs a terminal command, like deleting a file, generating new files, or running a code generator, that change is invisible to the checkpoint system. Clicking restore or rewind rolls back the edits the agent made directly, but leaves anything done through the terminal completely untouched, which can quietly leave deleted files gone or unwanted generated files in place. This project is a small set of git hooks, written in bash and python3 with no extra dependencies, that plugs into both Cursor and Claude Code. After every turn where the agent changes anything, the entire workspace gets committed automatically as a journal entry. When you use the built in checkpoint or rewind button, the next message you send triggers a check: if the current state matches an earlier saved snapshot, the tool resets your whole project back to that point, including terminal-made changes, while safely backing up anything discarded first so nothing is permanently lost. A small marker file is bumped by the agent at the start of file-changing turns so even terminal-only changes get tracked precisely. Slash commands round out the workflow. One squashes the messy journal commits into clean, reviewable commits before you push. Another does a file-only rewind that keeps your conversation history intact, and another cleans up old backup data to save disk space. The project includes safeguards for real codebases, such as refusing to interfere during an in-progress merge or rebase, and automatically excluding directories that suddenly generate huge numbers of files, like a fresh npm install. This suits developers actively using Cursor or Claude Code on real projects who want their rewind or checkpoint button to genuinely undo everything the agent did, not just the parts it edited directly. Setup requires git and python3 on macOS or Linux, and the project is released under the MIT license.

Copy-paste prompts

Prompt 1
Help me install rewind-properly for Claude Code in my project following this README.
Prompt 2
Explain how the restore sync detection works when I click Cursor's checkpoint button.
Prompt 3
Walk me through using the ship-properly slash command to clean up my commit history.
Prompt 4
What safeguards does this tool have to avoid interfering with an in-progress git rebase?

Frequently asked questions

What is rewind-properly?

Git hooks that make Cursor's checkpoints and Claude Code's rewind also undo terminal command changes, not just direct file edits.

What language is rewind-properly written in?

Mainly Shell. The stack also includes Shell, Python, Git.

What license does rewind-properly use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is rewind-properly to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is rewind-properly for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.