Snaplet can be self-hosted within your own trusted infrastructure.

Generate your configuration file

In order to tell Snaplet how to select, transform and subset your data you need to generate a snaplet.config.ts file along with its types based on your source database schema.

>_ terminal

SNAPLET_SOURCE_DATABASE_URL='postgres://' npx snaplet config generate --type typedefs --type transform

Capture snapshots

Once you're happy with your configuration, you can capture a snapshot of your source database.

>_ terminal

SNAPLET_SOURCE_DATABASE_URL='postgres://' npx snaplet snapshot capture /tmp/my-snapshot

Share snapshots via Snaplet Cloud ☁️

You can share your snapshots via Snaplet Cloud so all your teamates can restore them.

>_ terminal

npx snaplet snapshot share /tmp/my-snapshot

Restore snapshots

You can restore a snapshot to a target database.

>_ terminal

SNAPLET_TARGET_DATABASE_URL='postgres://username:password@localhost:5432/development_database' npx snaplet snapshot restore /tmp/my-snapshot