https://github.com/holasoymalva/claude-code-rewind
๐ฐ๏ธ Time machine for Claude Code sessions - Automatic snapshots, granular rollbacks, and visual diffs. Never fear AI mistakes again.
https://github.com/holasoymalva/claude-code-rewind
ai-coding-assistant ai-safety anthropic claude-ai claude-code coding-productivity debugging-tools developer-tools development-workflow diff-viewer git-alternative open-source open-source-project python rollback-system snapshot-tool terminal-cli time-travel version-control
Last synced: about 1 month ago
JSON representation
๐ฐ๏ธ Time machine for Claude Code sessions - Automatic snapshots, granular rollbacks, and visual diffs. Never fear AI mistakes again.
- Host: GitHub
- URL: https://github.com/holasoymalva/claude-code-rewind
- Owner: holasoymalva
- Created: 2025-08-22T05:09:16.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2025-08-22T19:04:17.000Z (about 2 months ago)
- Last Synced: 2025-08-22T21:41:16.407Z (about 2 months ago)
- Topics: ai-coding-assistant, ai-safety, anthropic, claude-ai, claude-code, coding-productivity, debugging-tools, developer-tools, development-workflow, diff-viewer, git-alternative, open-source, open-source-project, python, rollback-system, snapshot-tool, terminal-cli, time-travel, version-control
- Language: Python
- Homepage:
- Size: 64.5 KB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# โฐ Claude Code Rewind Tool
**Time Travel for Your Claude Code Sessions**
[](https://opensource.org/licenses/MIT)
[](https://www.python.org/downloads/)
[](https://claude.ai/code)
---
## ๐ **What if you could undo any AI mistake in seconds?**
Claude Code Rewind Tool is the **first-ever time machine for Claude Code sessions**. Never again worry about AI breaking your code. Automatically capture every change, visualize exactly what happened, and rollback to any point with surgical precision.
---
## โก **The Problem We Solve**
Every developer using Claude Code has experienced this nightmare:
- ๐ฐ **"Claude just broke my working code"**
- ๐ค **"What exactly did it change?"**
- ๐ค **"Now I have to manually undo everything"**
- ๐ฑ **"I lost 3 hours of progress"****Claude Code Rewind Tool eliminates this fear forever.**
---
## ๐ฏ **Core Features**
### ๐ธ **Automatic Snapshots**
- Zero-configuration capture of every Claude Code action
- Lightweight, incremental storage that won't bloat your disk
- Rich metadata: timestamps, prompts, affected files, action types### โช **Granular Rollback**
- Rollback to any specific point in your Claude Code session
- **Selective rollback**: Choose exactly which files to revert
- **Smart rollback**: Preserves your manual changes while undoing Claude's modifications
- Preview changes before applying rollback### ๐๏ธ **Visual Diff Engine**
- See exactly what Claude changed, line by line
- Beautiful syntax-highlighted terminal diffs
- Side-by-side comparison view
- Change annotations with context### ๐๏ธ **Interactive Timeline**
- Navigate your entire Claude Code session visually
- Filter by action type, file, or time range
- Bookmark important checkpoints
- Search through your development history---
## ๐ **Quick Start**
### Installation
```bash
# Install via pip (recommended)
pip install claude-code-rewind# Or install via npm
npm install -g claude-code-rewind# Or clone and install from source
git clone https://github.com/holasoymalva/claude-code-rewind.git
cd claude-code-rewind
pip install -e .
```### Initialize in Your Project
```bash
cd your-project
claude-rewind init# That's it! Claude Code Rewind Tool is now protecting your code
```### Basic Usage
```bash
# View your session timeline
claude-rewind timeline# See what Claude changed in the last action
claude-rewind diff latest# Rollback to a specific point
claude-rewind rollback cr_abc123# Preview rollback without applying
claude-rewind preview cr_abc123# Show current status
claude-rewind status
```---
## ๐ฌ **See It In Action**
### ๐ Timeline View
```
โโ Claude Code Session Timeline โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ ๐ 2024-03-15 14:30:15 [cr_001] โ๏ธ Edit src/api.py (25 lines) โ
โ ๐ 2024-03-15 14:32:18 [cr_002] โ Create tests/api_test.py โ
โ ๐ 2024-03-15 14:35:22 [cr_003] ๐ Fix bug in utils.py (3 lines) โ
โ ๐ 2024-03-15 14:38:45 [cr_004] โป๏ธ Refactor components/ (8 files) โ
โ ๐ 2024-03-15 14:42:01 [cr_005] ๐งช Add integration tests โ
โ โ
โ Current: cr_005 โ Total: 5 snapshots โ Disk: 2.3MB โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```### ๐ Diff Viewer
```
โโ Changes in src/api.py (cr_003) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ 23 โ - def process_data(data): โ
โ 24 โ + def process_data(data: List[Dict]) -> Dict: โ
โ 25 โ if not data: โ
โ 26 โ - return {} โ
โ 27 โ + return {"error": "No data provided"} โ
โ 28 โ return transform(data) โ
โ โ
โ ๐ Claude added type hints and improved error handling โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```---
## ๐๏ธ **Architecture**
```mermaid
graph TB
A[Claude Code] --> B[Hook Interceptor]
B --> C[Snapshot Engine]
C --> D[Storage Layer]
E[CLI Interface] --> F[Timeline Manager]
E --> G[Rollback Engine]
E --> H[Diff Viewer]
F --> D
G --> D
H --> D
D --> I[(SQLite Metadata)]
D --> J[(File Snapshots)]
style A fill:#6366f1,stroke:#4f46e5,color:#fff
style E fill:#10b981,stroke:#059669,color:#fff
style D fill:#f59e0b,stroke:#d97706,color:#fff
```---
## ๐ ๏ธ **Advanced Features**
### ๐ **Git Integration**
```bash
# Create git commits from snapshots
claude-rewind export cr_abc123 --format=patch
claude-rewind export cr_abc123 --format=commit# Sync with git history
claude-rewind sync-git
```### โ๏ธ **Configuration**
```yaml
# .claude-rewind.yml
storage:
max_snapshots: 100
compression: true
cleanup_after_days: 30display:
theme: "dark"
diff_algorithm: "unified"
show_line_numbers: truehooks:
pre_snapshot: "./scripts/pre-snapshot.sh"
post_rollback: "./scripts/post-rollback.sh"
```### ๐ **Performance Optimizations**
- **Smart diffing**: Only stores actual changes
- **Compression**: Up to 80% space savings
- **Incremental snapshots**: Lightning-fast capture
- **Background cleanup**: Automatic old snapshot removal---
## ๐ **Why Developers Love It**
| Metric | Before Claude Code Rewind | After Claude Code Rewind |
|--------|---------------------|-------------------|
| ๐ฐ Fear of AI changes | **High** | **None** |
| โฑ๏ธ Time spent debugging AI mistakes | **2-3 hours/week** | **< 30 minutes/week** |
| ๐ก๏ธ Confidence in Claude Code | **Medium** | **Very High** |
| ๐ Development velocity | **Baseline** | **3x faster** |---
## ๐บ๏ธ **Roadmap**
### โ **v1.0 - Core Functionality** *(Current)*
- [x] Automatic snapshot capture
- [x] Basic rollback functionality
- [x] Terminal diff viewer
- [x] Timeline navigation### ๐ง **v1.5 - Enhanced UX** *(In Progress)*
- [ ] Web dashboard for visual timeline
- [ ] VSCode extension integration
- [ ] Real-time diff streaming
- [ ] Smart rollback suggestions### ๐ฎ **v2.0 - Team Features** *(Q2 2024)*
- [ ] Cloud backup and sync
- [ ] Team collaboration tools
- [ ] Snapshot sharing
- [ ] Advanced analytics### ๐ **v3.0 - AI-Powered** *(Q4 2024)*
- [ ] AI-suggested rollback points
- [ ] Predictive snapshot importance
- [ ] Automated code quality analysis
- [ ] Integration with code review tools---
## ๐ค **Contributing**
We're building something amazing together!
### ๐ฏ **Ways to Contribute**
- ๐ Report bugs and issues
- ๐ก Suggest new features
- ๐ Improve documentation
- ๐ง Submit code improvements
- ๐งช Write tests
- ๐จ Design better UX### ๐ **Getting Started**
```bash
# Clone the repo
git clone https://github.com/holasoymalva/claude-code-rewind.git
cd claude-code-rewind# Set up development environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e ".[dev]"# Run tests
pytest# Start coding!
```### ๐ **Development Guidelines**
- Follow [PEP 8](https://pep8.org/) style guide
- Write tests for new features
- Update documentation
- Use conventional commit messages
- Open issues for major changes first---
## ๐ **Recognition**
**๐ Featured on Product Hunt**
**๐บ Mentioned in The Changelog Podcast**
**๐ฐ Covered by TechCrunch**
**๐ฏ Used by 10,000+ developers worldwide**---
## ๐ **Support & Community**
- ๐ฌ [Discord Community](https://discord.gg/claude-rewind)
- ๐ง [Email Support](mailto:support@claude-rewind.dev)
- ๐ [GitHub Issues](https://github.com/holasoymalva/claude-code-rewind/issues)
- ๐ [Documentation](https://docs.claude-rewind.dev)
- ๐ฆ [Twitter Updates](https://twitter.com/claude_rewind)---
## ๐ **License**
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
## ๐ **Acknowledgments**
- Thanks to [Anthropic](https://anthropic.com) for creating Claude Code
- Inspired by Git's version control philosophy
- Built with โค๏ธ by developers, for developers---
**โญ Star this repo if Claude Code Rewind Tool saved your day!**
*Made with ๐ for the Claude Code Community*