Automated file protection and snapshot management for VS Code
Never lose critical work again. SnapBack automatically protects your important files and creates snapshots before risky changes.
- ✅ Auto-Protection: Automatically protect config files, credentials, schemas
- ✅ Local Snapshots: Create unlimited snapshots stored locally
- ✅ Secret Detection: Prevent committing API keys and passwords
- ✅ Risk Analysis: Detect dangerous code patterns
- ✅ File History: Track changes to protected files
- ✅ Works Offline: No account or internet required
Get a free API key from snapback.dev to unlock:
- 🔐 Cross-Device Sync: Access snapshots on any computer
- 🔐 Team Sharing: Share protection rules with your team
- 🔐 Advanced Analytics: ML-powered risk detection
- 🔐 Cloud Backup: Never lose snapshots
-
Install from VS Code Marketplace
OR via command line:
code --install-extension snapback.snapback
-
That's it! Extension works immediately - no setup needed.
- Open any file (e.g.,
.env,database.ts) - Right-click → SnapBack: Protect This File
- Choose protection level:
- Watched: Monitor for changes
- Caution: Warn before risky edits
- Protected: Require confirmation to edit
- Press
Cmd+Shift+S(orCtrl+Shift+Son Windows/Linux) - Enter a description (e.g., "Before refactor")
- Done! Snapshot saved locally
- Open Command Palette (
Cmd+Shift+P) - Type "SnapBack: Restore Snapshot"
- Select snapshot from list
- Files restored to that point in time
┌─────────────────────────────────────┐
│ Your Workspace │
│ ┌────────────────────────────────┐ │
│ │ .env [PROTECTED] 🔒 │ │
│ │ auth.ts [CAUTION] ⚠️ │ │
│ │ database.ts [WATCHED] 👁️ │ │
│ └────────────────────────────────┘ │
│ │
│ SnapBack monitors edits │
│ ├─ Detects secrets │
│ ├─ Warns on risky changes │
│ └─ Auto-creates snapshots │
└─────────────────────────────────────┘
| Command | Shortcut | Description |
|---|---|---|
| Create Snapshot | Cmd+Shift+S |
Create snapshot of current state |
| Restore Snapshot | - | View and restore from snapshots |
| Protect File | - | Add file to protection list |
| View Protected Files | - | See all protected files |
| Snapshot Settings | - | Configure auto-snapshot rules |
- Monitors file for changes
- Shows badge in file explorer
- Non-intrusive
Good for: Config files, package.json
- Shows warning banner when editing
- Suggests creating snapshot first
- Can still edit freely
Good for: Auth logic, database schemas
- Requires explicit confirmation to edit
- Auto-creates snapshot before changes
- Maximum safety
Good for: .env files, private keys, production configs
{
// Auto-protect common files
"snapback.autoProtect": true,
// Protection patterns (glob)
"snapback.protectionPatterns": [
"*.env*",
"**/*.key",
"**/secrets/**"
],
// Auto-snapshot before risky changes
"snapback.autoSnapshot": true,
// Optional: API key for cloud features
"snapback.apiKey": ""
}- Get free API key: snapback.dev
- Open Settings (
Cmd+,) - Search "SnapBack API Key"
- Paste your key
- Cloud features enabled!
| Feature | Free (Local) | With API Key |
|---|---|---|
| File Protection | ✅ Unlimited | ✅ Unlimited |
| Local Snapshots | ✅ Unlimited | ✅ Unlimited |
| Secret Detection | ✅ Basic | ✅ ML-Powered |
| Works Offline | ✅ Yes | ✅ Yes |
| Cloud Sync | ❌ | ✅ Yes |
| Team Sharing | ❌ | ✅ Yes |
| Cross-Device | ❌ | ✅ Yes |
| Advanced Analytics | ❌ | ✅ Yes |
- No telemetry without your consent
- Local-first: All data stored in your workspace by default
- Open source: Audit the code yourself
- No tracking: We don't know what files you protect
- API key optional: Full features work offline
// .snapbackrc in your workspace root
{
"protection": {
"patterns": {
"*.env*": "protected",
"src/auth/**": "caution",
"database/**": "watched"
}
}
}{
"snapshots": {
"autoCreate": {
"beforeGitCommit": true,
"beforeRefactor": true,
"beforeDeploy": true
}
}
}- Check VS Code version (requires 1.80+)
- Reload window:
Cmd+Shift+P→ "Reload Window" - Check extension is enabled: Extensions panel
- Check storage location:
.snapback/in workspace - Verify disk space available
- Check file permissions
- Verify API key in settings
- Check internet connection
- Look for error notifications
git clone https://github.com/snapback-dev/vscode.git
cd vscode
pnpm install
pnpm build
# Package
pnpm vsce package
# Install locally
code --install-extension snapback-1.0.0.vsix# Run tests
pnpm test
# Launch extension development host
pnpm dev- Documentation: docs.snapback.dev
- Get API Key: snapback.dev
- Report Issues: github.com/snapback-dev/vscode/issues
- Main Repository: Marcelle-Labs/snapback.dev
@snapback/mcp-server- MCP server for AI tools@snapback-oss/sdk- TypeScript SDK
Apache-2.0 © SnapBack