Laravel local development

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.

bash
$ composer require hasinhayder/tyro-checkpoint --dev
PHP 8.1+ Laravel 10 – 13 SQLite · MySQL · PostgreSQL
tyro-app - zsh
php artisan tyro-checkpoint:create before_migration ✓ Checkpoint created successfully! ID: 3 Name: before_migration Size: 2.45 MB Driver: mysql php artisan migrate:fresh --seed ✓ Auto checkpoint created before migrate:fresh auto_2026_06_17_153000_migrate_fresh php artisan tyro-checkpoint:restore before_migration ✓ Restored checkpoint #3 - before_migration
snapshot experiment restore
1 command
to snapshot your entire database
3 engines
SQLite, MySQL & PostgreSQL
0 migrations
metadata lives in a JSON file
AES-256
optional encrypted snapshots
Features

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.

Quick Start

From zero to first checkpoint in 30 seconds

STEP 01

Install

Add it as a dev dependency via Composer. Laravel auto-discovers the service provider.

$ composer require \
hasinhayder/tyro-checkpoint --dev
STEP 02

Set up

Run the installer - it validates your DB driver, CLI binaries and creates the storage directory.

$ php artisan tyro-checkpoint:install
✓ Storage ready ✓ config verified
STEP 03

Checkpoint

Create your first snapshot. Optionally add --encrypt or --silent.

$ php artisan tyro-checkpoint:create
  clean_baseline
✓ Checkpoint #1 created
Auto-Save Mode

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.

migratemigrate:freshmigrate:refreshmigrate:resetmigrate:rollbackdb:seeddb:wipe
# .env
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
Command Reference

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 databasenew
tyro-checkpoint:list [id|name]List all checkpoints, or inspect one as a shortcut to details
tyro-checkpoint:details [id|name]Inspect a checkpoint - size, driver, database, note & flags
tyro-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)new
tyro-checkpoint:lock / :unlock [id|name]Protect a checkpoint from deletion
tyro-checkpoint:flag / :unflag [id|name]Mark a checkpoint for attention
tyro-checkpoint:add-note [id|name]Attach a descriptive note
tyro-checkpoint:delete [id|name]Delete a single unlocked checkpoint
tyro-checkpoint:flush [--force]Delete all unlocked checkpoints at once
tyro-checkpoint:installValidate setup & create storage
tyro-checkpoint:generate-keyCreate an encryption key in .env
tyro-checkpoint:publish-configPublish config/tyro-checkpoint.php
tyro-checkpoint:versionShow version, Laravel & PHP info