Tyro Checkpoint: Instant SQLite Snapshots for Laravel Local Development

Last updated on by

If you've ever run a migration that left your local SQLite database in a broken state, or a seeder that wiped out carefully arranged test data, and wished you could roll back to exactly where you started, Tyro Checkpoint is built for that workflow. Created by Hasin Hayder, this dev-only Laravel package lets you create named snapshots of your SQLite database and restore them instantly, without re-running migrations or seeders.

Tyro Checkpoint stores full copies of your SQLite database file outside the database itself. Metadata (names, timestamps, notes, lock status) is tracked in a checkpoints.json file, so restoring a snapshot won't wipe out your checkpoint history. Think of it like Git commits for your local database state.

Installation

composer require hasinhayder/tyro-checkpoint --dev
php artisan tyro-checkpoint:install

The install command verifies your database configuration and creates the storage/tyro-checkpoints/ directory where snapshots are stored.

Creating and Restoring Checkpoints

Creating a checkpoint is one command:

php artisan tyro-checkpoint:create [snapshot_name]

To see all your snapshots:

php artisan tyro-checkpoint:list

When you're ready to roll back:

php artisan tyro-checkpoint:restore [snapshot_name]

You can restore by name or by ID. Restored checkpoints remain available, so you can restore the same snapshot multiple times across a testing session without recreating it.

Managing Checkpoints

The package includes a handful of commands for keeping your checkpoints organized:

Command Description
tyro-checkpoint:add-note [id] Attach a note to a checkpoint
tyro-checkpoint:lock [id] Prevent a checkpoint from being deleted
tyro-checkpoint:unlock [id] Remove lock protection
tyro-checkpoint:delete [id] Delete a specific checkpoint
tyro-checkpoint:flush Delete all unlocked checkpoints at once

Locking is particularly useful for preserving a clean baseline—lock it, and tyro-checkpoint:flush won't touch it.

Optional Encryption

For development workflows involving production-like data, the package supports AES-256 file-level encryption. Generate a key first:

php artisan tyro-checkpoint:generate-key

Add the key to your .env file as TYRO_CHECKPOINT_ENCRYPTION_KEY, and new checkpoints will be encrypted automatically.

Note: if you lose or rotate the encryption key, any checkpoints created with the old key become inaccessible.

Configuration

To customize the storage path, publish the config file:

php artisan tyro-checkpoint:publish-config

This creates config/tyro-checkpoint.php, where you can change the snapshot directory and manage encryption settings.

A Few Things to Keep in Mind

Each checkpoint is a full copy of your database file, so disk usage grows with each snapshot. The flush command helps with cleanup, but locked checkpoints must be deleted manually. This also isn't a production backup tool—it's a local development convenience.

You can find the source code at hasinhayder/tyro-checkpoint on GitHub and read the full documentation on the project site.

Yannick Lyn Fatt photo

Staff Writer at Laravel News and Full stack web developer.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $9500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises

The latest

View all →
Typed Translation Accessors in Laravel 13.15.0 image

Typed Translation Accessors in Laravel 13.15.0

Read article
Refresh Your Laravel Database Without Dropping Every Table image

Refresh Your Laravel Database Without Dropping Every Table

Read article
JSON Schema Deserialization in Laravel 13.14 image

JSON Schema Deserialization in Laravel 13.14

Read article
Generate Short, URL-Safe IDs From Numbers With Sqids image

Generate Short, URL-Safe IDs From Numbers With Sqids

Read article
Scheduler List: A Web Dashboard for Laravel's Scheduled Tasks image

Scheduler List: A Web Dashboard for Laravel's Scheduled Tasks

Read article
Community Laravel Extension for Zed image

Community Laravel Extension for Zed

Read article