Git for your database.
Checkpoint your local database before risky work, then restore the exact state in seconds. Built for SQLite, MySQL and PostgreSQL with optional locks and encryption.
$ composer require hasinhayder/tyro-checkpoint --dev
Everything you need to move fast without losing state
Built for the messy reality of local development - experiment freely, then snap back to a known-good database in seconds.
Instant snapshots
Full database copy in one command - file copy for SQLite, SQL dump for MySQL & PostgreSQL.
One-command restore
Roll back to any checkpoint by ID or name. Checkpoints are never deleted on restore - repeat as often as you like.
Lock & protect
Lock baseline states so flush and delete can never touch them. Perfect for clean seed baselines.
Notes & flags
Annotate checkpoints with descriptive notes and flag the ones that need attention with a 🚩 marker.
Encrypted snapshots
Secure sensitive dumps with --encrypt at creation, or encrypt an existing checkpoint in place. Restore auto-decrypts using your TYRO_CHECKPOINT_ENCRYPTION_KEY.
Auto-checkpoints
Optionally snapshot automatically before migrations, seeders and db:wipe - your safety net, on by a flag.
Fast & Efficient
Direct file copies and native CLI tools keep snapshots and restores fast, even on large databases.
Metadata outside the DB
Checkpoint metadata lives in checkpoints.json, so restoring never makes you lose track of other snapshots.
Production-safe
Install as a --dev dependency. Zero migrations, zero config - register, install, checkpoint.
From zero to first checkpoint in 30 seconds
Install
Add it as a dev dependency via Composer. Laravel auto-discovers the service provider.
hasinhayder/tyro-checkpoint --dev
Set up
Run the installer - it validates your DB driver, CLI binaries and creates the storage directory.
✓ Storage ready ✓ config verified
Checkpoint
Create your first snapshot. Optionally add --encrypt or --silent.
clean_baseline
✓ Checkpoint #1 created
A safety net before every risky command
Flip one env flag and Tyro Checkpoint silently snapshots your database right before migrations, seeders and wipes run. Something blew up? Roll back to the auto-checkpoint - no data archaeology required.
TYRO_CHECKPOINT_AUTO_ENABLED=true
➜ php artisan migrate:fresh --seed
✓ Auto checkpoint created before
migrate:fresh
→ auto_2026_06_17_153000_
migrate_fresh
# rolled back too far? restore it:
➜ php artisan tyro-checkpoint:restore \
auto_2026_06_17_153000_migrate_fresh
The full toolkit
Every command accepts a checkpoint ID or name - and prompts interactively when you omit it.
tyro-checkpoint:create [name] [--encrypt] [--silent]Snapshot the current databasenewtyro-checkpoint:list [id|name]List all checkpoints, or inspect one as a shortcut to detailstyro-checkpoint:details [id|name]Inspect a checkpoint - size, driver, database, note & flagstyro-checkpoint:restore [id|name] [--force]Replace the current DB with the snapshot (auto-decrypts)tyro-checkpoint:encrypt [id|name]Encrypt an existing snapshot in place (idempotent, no double-encrypt)newtyro-checkpoint:lock / :unlock [id|name]Protect a checkpoint from deletiontyro-checkpoint:flag / :unflag [id|name]Mark a checkpoint for attentiontyro-checkpoint:add-note [id|name]Attach a descriptive notetyro-checkpoint:delete [id|name]Delete a single unlocked checkpointtyro-checkpoint:flush [--force]Delete all unlocked checkpoints at oncetyro-checkpoint:installValidate setup & create storagetyro-checkpoint:generate-keyCreate an encryption key in .envtyro-checkpoint:publish-configPublish config/tyro-checkpoint.phptyro-checkpoint:versionShow version, Laravel & PHP info