Metadata-Version: 2.4
Name: rewind-ai
Version: 0.1.1
Summary: Automatic session checkpoints for AI coding agents. Undo just what went wrong.
Author: Daksh Gulecha
License: MIT
Project-URL: Homepage, https://github.com/dakshgulecha/rewind-ai
Project-URL: Issues, https://github.com/dakshgulecha/rewind-ai/issues
Keywords: ai,claude,cursor,copilot,git,undo,checkpoint,agent
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Software Development :: Version Control
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: watchdog>=4.0.0
Requires-Dist: gitpython>=3.1.40
Requires-Dist: click>=8.1.0
Requires-Dist: rich>=13.0.0
Requires-Dist: platformdirs>=4.0.0
Requires-Dist: psutil>=5.9.0
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Dynamic: license-file

<div align="center">

# ⏪ Rewind

### An undo button for AI coding agents.

Rewind watches your repository, automatically creates checkpoints whenever an AI agent starts making changes, and lets you instantly roll back to any point in the session. No commits, no branch switching, no lost work—just one command to get back to the last good state.

[![PyPI version](https://img.shields.io/pypi/v/rewind-ai.svg)](https://pypi.org/project/rewind-ai/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)

</div>

---

# Your AI coding agent just destroyed 14 files.

Get back to the last good state in one command.

AI coding agents are incredible.

Until they aren't.

You ask Claude Code to add authentication.

Ten minutes later:

- 14 files changed
- Half the changes are brilliant
- The other half are a disaster
- You have absolutely no idea where things went wrong

Now what?

```bash
git checkout .
```

Congratulations. You just deleted the 10 minutes of good work too.

Or you can spend the next hour manually undoing files.

Or ask the agent to undo itself and hope it doesn't make things worse.

There should be a better option.

**Rewind creates automatic checkpoints while your AI agent works, so you can jump back to any moment of the session instantly.**

```bash
rewind jump 2
```

Done.

Your git history stays clean.

Your branch stays untouched.

Only the bad changes disappear.

---

## Why Rewind Exists

Git was built for humans.

AI agents don't behave like humans.

Humans:

- Edit one file at a time
- Make deliberate changes
- Commit intentionally

AI agents:

- Touch dozens of files in seconds
- Refactor entire systems at once
- Occasionally decide working code needs "improvement"

When an AI agent goes off the rails, Git gives you two choices:

1. Keep everything
2. Lose everything

Rewind gives you a third option:

**Keep the good work. Remove the bad work.**

---

## See It In Action

You tell Claude Code:

> Add authentication to my application.

A few minutes later:

```bash
rewind list
```

```text
Session checkpoints

#  Time      Description
4  1m ago    Modified middleware and routes
3  4m ago    Updated auth implementation
2  8m ago    Added authentication module
1  12m ago   Updated package dependencies
0  14m ago   Initial state
```

Something broke after checkpoint 2.

Inspect exactly what changed:

```bash
rewind diff 3
```

Restore the last known good state:

```bash
rewind jump 2
```

Your commits remain untouched.

Your branch remains untouched.

Your work remains intact.

---

## Installation

```bash
pip install rewind-ai
```

Start the watcher:

```bash
rewind watch &
```

That's it.

Rewind now silently watches your repository and automatically creates checkpoints whenever an AI agent starts making significant changes.

No setup.

No configuration.

No cloud account.

---

## How It Works

Rewind monitors filesystem activity and detects write bursts—the characteristic pattern of AI coding agents modifying multiple files in rapid succession.

When a burst is detected, Rewind creates a lightweight checkpoint of your working tree.

These checkpoints:

- Don't create commits
- Don't clutter your git history
- Don't touch your branch
- Don't require any action from you

They're simply there when you need them.

---

## Works With Every AI Coding Agent

Because Rewind watches filesystem activity rather than integrating with specific tools, it works with virtually anything:

- Claude Code
- Cursor
- GitHub Copilot
- Aider
- OpenHands
- Devin
- Gemini CLI
- Any custom coding agent

If it writes files, Rewind can protect you from it.

---

## Commands

### Start Watching

```bash
rewind watch
```

### Stop Watching

```bash
rewind stop
```

### Check Status

```bash
rewind status
```

### Create Manual Checkpoint

```bash
rewind snap
```

### View Checkpoints

```bash
rewind list
```

### Inspect Changes

```bash
rewind diff 4
```

### Restore Previous State

```bash
rewind jump 4
```

### Create Branch From Checkpoint

```bash
rewind branch 4
```

### Remove Checkpoints

```bash
rewind clear
```

---

## Why Not Just Commit More Often?

Frequent commits help.

But they don't solve this problem.

- Commits clutter history with half-finished work
- You still can't restore to moments between commits
- You have to remember to create them
- They weren't designed for autonomous agents modifying dozens of files at once

Rewind is automatic.

It works while you're thinking about your code—not your version control strategy.

---

## Privacy

Everything runs locally.

- No telemetry
- No analytics
- No cloud sync
- No network requests

Your code never leaves your machine.

---

## The Future of AI Coding Needs a Better Undo Button

AI coding agents are becoming more powerful every month.

They're writing more code, touching more files, and making bigger changes than ever before.

The better they get, the more important safe rollback becomes.

Rewind isn't a replacement for Git.

It's the missing layer between "everything is fine" and "what just happened to my repository?"

---

## Contributing

```bash
git clone https://github.com/dakshgulecha/rewind-ai
cd rewind-ai
pip install -e ".[dev]"
pytest
```

Issues and pull requests are welcome.

---

## License

MIT

---

<div align="center">

**If Rewind saves you even once, consider giving the project a star.**

⭐ It helps more developers discover it before their AI agent decides to refactor the entire codebase.

</div>
