Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Punam SafeCode - Snapshot Recovery for AI CodingNew to Visual Studio Code? Get it now.
Punam SafeCode - Snapshot Recovery for AI Coding

Punam SafeCode - Snapshot Recovery for AI Coding

Preview

Docufiy Technologies

|
3 installs
| (0) | Free
Create local project snapshots, preview changes, and restore files after risky AI coding edits. No Git or cloud account required.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Punam SafeCode - Snapshot Recovery for AI Coding

The Undo Button for AI Coding.

Before AI breaks your code, Punam saves it.

The Problem

AI coding tools can change many files in seconds. If the result breaks your project, editor undo history may not be enough, untracked files may be lost, and you may not have made a Git commit before the changes started.

The Solution

Punam SafeCode creates local project snapshots before risky edits. You can preview what a restore will change, roll back files in seconds, and export a recovery point as a ZIP. No Git setup or cloud account is required.

Free and open source · Fully local · No account · No telemetry · No tracking

Punam SafeCode never uploads your code. Snapshots remain in your workspace unless you explicitly export or move them.

See It in Action

Create a Snapshot

Name a recovery point before an AI coding session or any risky edit.

Create a real project snapshot with Punam SafeCode

Create a snapshot in Punam SafeCode

Recover a Snapshot

Preview and restore a real project snapshot after unwanted code changes.

Recover a real project snapshot with Punam SafeCode

Preview and Manage Snapshots

Review a snapshot and access Preview, Restore, Export, and Delete from the snapshot menu.

Preview and manage a Punam SafeCode snapshot

Restore Preview

Inspect the restore summary before applying a snapshot. Punam creates an emergency snapshot of the current state before every restore.

Punam SafeCode restore preview


Features

🗃️ Create Snapshot

Capture the full state of your project in one click. Give it a name like "Before AI refactor" or leave it blank for a timestamp. All files are copied into .punam-snapshots/ inside your project.

🔍 Restore Preview

Before restoring, see exactly what will change:

  • Files that will be modified
  • Files that will be added (exist in snapshot, missing from workspace)
  • Files that will be deleted (in workspace, not in snapshot)

A diff summary opens in a webview panel so you can decide before committing.

🔄 One-Click Rollback

Restore any snapshot to bring your project back to that exact state. Before every restore, Punam automatically creates an emergency snapshot of your current state so you can always undo the undo.

📦 ZIP Export

Export any snapshot as a .zip file to share with a colleague, attach to a bug report, or archive offline.

🕒 Snapshot Timeline

A sidebar panel lists all your snapshots with name, date, and file count. Right-click any snapshot for context actions: Preview, Restore, Export, Delete.

⚡ Auto Snapshots

When 5 or more files change quickly (e.g. an AI tool doing a bulk edit), Punam captures the resulting project state as a recovery point in the background. This checkpoint is created after the detected changes; it cannot reconstruct the state from before those edits. Detection is debounced to 5 seconds, with a 10-minute cooldown to avoid noise.


Why Not Just Git?

Git is a version control system — it tracks intentional, meaningful commits. It is not designed to capture "before I let the AI touch everything" moments.

Git Punam SafeCode
Requires setup Yes (init, stage, commit) No
Works on untracked files No Yes
Instant point-in-time capture Requires discipline Yes, one click
Emergency rollback before AI edits Manual Automatic
ZIP export of a moment Needs manual steps Built-in

Punam SafeCode complements Git. It does not replace it. Use Git for structured version history. Use Punam for safety nets around risky AI sessions.


Commands

Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and type Punam:

Command Description
Punam: Create Snapshot Capture project state now
Punam: List Snapshots View all snapshots in a Quick Pick
Punam: Preview Restore Show what will change before restore
Punam: Restore Snapshot Restore a snapshot (creates emergency backup first)
Punam: Export Snapshot as ZIP Save a snapshot as a .zip file
Punam: Delete Snapshot Remove a snapshot permanently
Punam: Open Snapshot Timeline Focus the Punam sidebar panel

You can also access all actions by right-clicking any snapshot in the Punam Snapshots sidebar.


Settings

Setting Default Description
punamSafeCode.autoSnapshot.enabled true Enable all automatic snapshots
punamSafeCode.autoSnapshot.onSave false Snapshot on every file save
punamSafeCode.autoSnapshot.onBulkChange true Create a recovery point after 5+ files change at once
punamSafeCode.snapshot.maxSnapshots 20 Retain at most this many snapshots
punamSafeCode.snapshot.includeHiddenFiles false Include dotfiles in snapshots
punamSafeCode.snapshot.confirmBeforeRestore true Show confirmation dialog before restore
punamSafeCode.snapshot.storageFolder .punam-snapshots Folder name for snapshot storage

Safety Design

  • Snapshots are stored inside your project in .punam-snapshots/ — nothing leaves your machine.
  • Before every restore, an emergency pre-restore snapshot is created automatically.
  • Restore never deletes .git or .punam-snapshots from your workspace.
  • All path operations are validated to stay inside workspace root — no symlink escapes, no path traversal.
  • Large files (>20 MB) are skipped to keep snapshots fast. The count of skipped files is recorded in metadata.
  • The following folders are always excluded from snapshots: .git, node_modules, dist, build, out, .next, .vite, target, .turbo, .cache, coverage, .punam-snapshots.

Limitations

  • Local only. Snapshots live on your machine in .punam-snapshots/. There is no cloud sync.
  • Large folders excluded. node_modules, dist, etc. are not snapshotted. Restore reinstates source files only. Run npm install after restoring if needed.
  • Individual files >20 MB are skipped. Binary assets, datasets, and videos are not captured.
  • Not a Git replacement. Punam does not track diffs, branches, or history semantics. Use Git alongside it.
  • Single workspace. Only the first workspace folder is used in a multi-root workspace.

Getting Started

  1. Install the extension.
  2. Open a project folder.
  3. Open the Punam SafeCode shield in the Activity Bar.
  4. Click the + button or Create your first snapshot in the welcome panel.
  5. Give your snapshot a name like "Before AI session" and press Enter.
  6. Let the AI do its thing.
  7. If something goes wrong, hover over the snapshot for Preview and Restore, or right-click it for all actions.

The panel header also includes Getting Started and Settings buttons. It shows whether automatic snapshots are enabled and the folder where snapshots are stored.


Open Source and Privacy

Punam SafeCode is free software released under the MIT License. Its source code is public so users can inspect how project files are copied, restored, and deleted.

  • Privacy policy
  • Security policy
  • Contributing guide
  • Changelog
  • Report a bug

Snapshots are a local recovery aid, not a substitute for Git, tested backups, or off-device disaster recovery.


Punam SafeCode — local, fast, and always ready to save you.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft