Laravel Packages

Tyro Checkpoint: Instant SQLite Snapshots for Laravel Local Development

Published Updated

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.

Sponsored

serpapi logo
SerpApi

The Web Search API for Your LLM and AI Applications

Visit SerpApi

The latest

View all →
Building EasyReply: How We Used Laravel to Unify Customer Support image

Building EasyReply: How We Used Laravel to Unify Customer Support

Read article
PostgreSQL Monitoring and Schema Linting for Laravel with Vacuum image

PostgreSQL Monitoring and Schema Linting for Laravel with Vacuum

Read article
PayZephyr: One Payment API for Stripe, Paystack, and PayPal image

PayZephyr: One Payment API for Stripe, Paystack, and PayPal

Read article
Bifrost Turns One With AI Builds and New Workflows image

Bifrost Turns One With AI Builds and New Workflows

Read article
Preview Blade Templates in macOS Finder with Quick Blade image

Preview Blade Templates in macOS Finder with Quick Blade

Read article
Artisan Debugging Commands in Laravel Telescope 5.24.0 image

Artisan Debugging Commands in Laravel Telescope 5.24.0

Read article