🛡️ AutoRecover
The Ultimate Local Time Machine for Your Code.
AutoRecover is a lightweight, production-ready disaster recovery and local backup system for developers. It silently creates local snapshots of your code and acts as a powerful safety net against destructive Git commands, unexpected AI overwrites, and accidental deletions.
🌟 Key Features
- 🕒 Auto Snapshots on Auto-Pilot: Periodically captures your files' exact state on save or on a configurable interval. It runs invisibly in the background with near-zero overhead.
- 🛡️ Git Safety Net: Automatically intercepts dangerous terminal commands like
git reset --hard or git clean -fd and immediately triggers an emergency workspace snapshot before execution.
- 🔍 Lineage Timeline: View a beautifully formatted history inside the AutoRecover sidebar to trace when files were captured, why they were captured, and their exact file sizes.
- 🚀 One-Click Diff & Restore: Compare your real-time editor code alongside backed-up snapshot data using VS Code's native diffing interface. Restore exactly what you lost.
- 🗜️ Optimized Storage: Uses an ignored
.autorecover/ footprint at the root of your workspace with compressed gzip-hashes to save disk space and automatically deduplicate identical text states.
🚀 Quick Start (How to use)
Getting started with AutoRecover is instant:
- Install: Search for
AutoRecover in the VS Code Extensions view and click Install.
- Automatic Protection: By default, AutoRecover will start capturing snapshots every time you save a file or every 10 minutes.
- Sidebar Access: Click the AutoRecover icon (the file clock 🕒) in the left-hand Activity Bar.
- View History: Select any file in the sidebar to see its capture history.
- Restore: Click on a specific timestamp to see a side-by-side diff. If you like the old version, just copy-paste it back or use the restore button!
🛠️ Usage Guide
1. View File History
Open the AutoRecover Activity Bar icon (the file clock) on the left panel. You will instantly see your most recent snapshots cleanly organized.
2. Compare Changes
Click on any snapshot in the sidebar to open a native native Diff comparison view. It will show exactly what your file looked like historically against your current real-time version!
3. Trigger Manual Snapshots
Hit F1 (or Cmd+Shift+P) and search for AutoRecover: Create Snapshot Now to force a manual backup right before making a massive experimental change.
⚙️ Configuration & Settings
Fine-tune AutoRecover by navigating to your VS Code Settings or modifying settings.json:
| Setting |
Default |
Description |
autorecover.enabled |
true |
Enables or disables AutoRecover capabilities. |
autorecover.autoBackup |
true |
Safely triggers a local snapshot every time you save. |
autorecover.snapshotInterval |
10 |
Frequency (in minutes) to automatically snapshot active documents. Set to 0 to disable. |
autorecover.enableGitProtection |
true |
Monitors the internal terminal to guard against volatile git actions natively. |
autorecover.maxFileSize |
5242880 |
Byte cap limit for extremely large file snapshots (Defaults to 5MB). |
autorecover.excludePatterns |
(Default Node Excludes) |
Glob patterns identifying directories that AutoRecover safely ignores. |
💡 Why AutoRecover?
Ever ran git checkout . on accident, only to realize you blew away two hours of uncommitted work? Or perhaps an AI coding assistant hallucinated and aggressively mangled half your file before you could blink?
AutoRecover exists so you never have to feel that stomach-drop again. We catch your code when you fall!
🛑 Known Issues / Limitations
- The extension actively detects dangerous git commands by monitoring terminal input inside VS Code. If commands are executed out-of-band via external CLIs or UI clients (like SourceTree), AutoRecover cannot intercept them.
- Batch workspace restoring is heavily gated to single-file manual UI reviews to protect developers against unintentional cascading overwrites.
📝 Release Notes
1.0.0
- Initial Market release! 🚀
- Core AutoBackup implementation,
.autorecover persistent local gzip storage, terminal intercept, and code comparison diffs!
Enjoy the peace of mind! If you love AutoRecover, please consider leaving a 5-star review! ⭐