No more lost code

🏛️ Introducing VerZanctuary: A Safe Sanctuary for Your Code Versions

Published: June 2025 • Author: Rob Deas


🔥 What Problem Does VerZanctuary Solve?

We’ve all been there:

  • Midway through a tricky refactor, wondering, “What if I need to roll back?”
  • Letting an AI agent make changes, but unsure what just broke.
  • Needing a temporary branch, but not wanting to clutter your Git history.

VerZanctuary solves this by creating isolated, timestamped snapshots of your code—without touching your actual Git repository.

You get the safety of version control, the flexibility of scratch workspaces, and a clean Git history. Perfect for experiments, backups, and collaborative AI sessions.


🧠 How It Works

VerZanctuary creates a hidden folder in a project.sanctuary folder called .sanctuary, which is a real Git repo—but managed entirely separately from your working one. It supports:

  • Snapshot creation (verz create)
  • 🕵️ Safe inspection (verz checkout --browse)
  • 🧪 Experimental workspaces (verz checkout --lab)
  • 🔍 Diff and compare (verz diff)
  • 🧹 Cleanup (verz cleanup --keep=5)

Under the hood, each snapshot becomes a Git branch (e.g., auto-20250612-1034-17-001) stored inside the .sanctuary directory.

bashCopyEdit$ verz create -s working_state -m "Before experimental refactor"
✅ Created sanctuary: auto-20250612-1034-17-001
📍 Location: .myproject.sanctuary/

🛠️ CLI Design: Clikt-Powered Commands

VerZanctuary’s CLI is built with Clikt, offering clean, intuitive commands:

bashCopyEditverz create                # Take a snapshot
verz list                  # List all snapshots
verz checkout <branch>     # Restore a snapshot
verz diff <branch>         # See what’s changed
verz cleanup --keep=10     # Keep recent snapshots, remove the rest

Optional flags like --no-git, --lab, --browse, and --ignore-locks offer power-user flexibility.


🧱 Safety First: Locking and Protection

Every operation is guarded by a lock system to prevent accidental corruption from parallel invocations. You can even inspect or forcibly unlock sanctuaries:

bashCopyEditverz lock status
verz lock unlock --force

And yes, there’s a pre-commit hook to block commits in the browse workspace unless explicitly allowed. Because it’s meant for inspection, not long-term editing.


🧪 Use Cases

  • 🤖 Before AI-generated refactors
  • 🧑‍💻 Start of a new experiment
  • 📆 End-of-day safe state
  • 🛠️ Breaking changes that might not work out
  • 🧾 Generating patch diffs without polluting real branches

🚀 Roadmap

VerZanctuary is currently at v0.1.0. Upcoming plans include:

  • Modularizing services (Git, FileOps, Diffs, Logging)
  • Exportable snapshot metadata
  • Integration with code agents or Git hooks
  • SvelteKit frontend for visual inspection

📦 Get It Now

The project is open source under Apache 2.0 and lives here:

👉 github.com/robdeas/verzanctuary

Install instructions, usage examples, and full source are available in the README.


💬 Feedback Welcome

VerZanctuary was born from frustration with unsafe AI edits and messy Git experiments. If you have thoughts, ideas, or want to contribute—get in touch on GitHub.

Let’s make coding (and experimenting) safer again. 🧪🛡️

Scroll to Top