Skip to main content

CLI Reference

auth

The snaplet auth command is used to manage auth state.

Usage

snaplet auth [action]

login

The snaplet auth login command is used to login with an access token.

Usage

snaplet auth login [access-token]

config

The snaplet config command is used to manage configuration.

Usage

snaplet config [action]

generate

The snaplet config generate command is used to generate transform files.

Usage

snaplet config generate

Command Flags

NameAliasTypeChoicesDefault
--type-tstringtypedefs,transform,keys,seedtypedefs
--dry-runbooleanfalse

list

The snaplet config list command is used to list config variables.

Usage

snaplet config list

pull

The snaplet config pull command is used to pull cloud project config to local.

Usage

snaplet config pull

Command Flags

NameAliasTypeChoicesDefault
--type-tstringschemas,transform,typedefs,publicKeyschemas,transform,typedefs,publicKey

push

The snaplet config push command is used to push local project config to cloud.

Usage

snaplet config push

Command Flags

NameAliasTypeChoicesDefault
--type-tstringschemas,transform,subsetting,publicKeyschemas,transform,subsetting,publicKey

setup

The snaplet config setup command is used to setup local project configuration.

Usage

snaplet config setup [targetDatabaseUrl]

Command Flags

NameTypeDefault
--generatebooleantrue
--yesbooleanfalse

database

The snaplet database command is used to manage preview databases.

Usage

snaplet database [action]

cache

The snaplet database cache command is used to cache a snapshot into the preview database server.

Usage

snaplet database cache [snapshot]

Command Args

NameDescriptionType
snapshotstring

Command Flags

NameDescriptionType
--tagsFilter snapshots by tagsarray
--latestSelect the latest snapshot captured to cache in the preview database serverboolean
--clearRemove the snapshot from the preview database server cacheboolean

create

The snaplet database create command is used to create a preview database from a snapshot.

Usage

snaplet database create [database-name] [snapshot]

Command Args

NameDescriptionType
database-namestring
snapshotstring

Command Flags

NameDescriptionType
--tagsFilter snapshots by tagsarray
--latestRestore the latest snapshotboolean
--no-snapshotCreate an empty database not based on a snapshotboolean
--gitInfer the database name from the current git branchboolean
--forceForce the database creation, it will drop and recreate the existing database if presentboolean

destroy

The snaplet database destroy command is used to destroy the database server.

Usage

snaplet database destroy

Command Flags

NameAliasDescriptionTypeDefault
--yes-yAutomatically answer "yes" to all questionsbooleanfalse

drop

The snaplet database drop command is used to drop a preview database.

Usage

snaplet database drop [database-name]

Command Args

NameDescriptionType
databaseNamestring

Command Flags

NameDescriptionTypeDefault
--gitInfer the database name from the current git branchbooleanfalse

list

The snaplet database list command is used to list preview databases.

Usage

snaplet database list

setup

The snaplet database setup command is used to create a preview database server.

Usage

snaplet database setup

Command Flags

NameDescriptionTypeChoices
--regionFilter snapshots by tagsstringams,cdg,den,dfw,ewr,fra,gru,hkg,iad,jnb,lax,lhr,maa,mad,mia,nrt,ord,otp,scl,sea,sin,sjc,syd,waw,yul,yyz

url

The snaplet database url command is used to show a preview database url.

Usage

snaplet database url [database-name]

Command Args

NameDescriptionType
databaseNamestring

Command Flags

NameDescriptionTypeDefault
--gitInfer the database name from the current git branchbooleanfalse

discord

The snaplet discord command is used to opens the Snaplet Discord chat window in your browser.

Usage

snaplet discord

documentation

The snaplet documentation command is used to opens the Snaplet Documentation in your browser.

Usage

snaplet documentation

project

The snaplet project command is used to manage project configuration.

Usage

snaplet project [action]

create

The snaplet project create command is used to create a new project.

Usage

snaplet project create <name>

Command Flags

NameAliasType
--team-tstring

invite

The snaplet project invite command is used to create an invite URL for this project.

Usage

snaplet project invite

setup

The snaplet project setup command is used to set up a project.

Usage

snaplet project setup [project-id]

Command Args

NameDescriptionType
projectIdstring

proxy

The snaplet proxy command is used to start a database proxy.

Usage

snaplet proxy

seed

The snaplet seed command is used to populates an empty database with generated data.

Usage

snaplet seed

Command Flags

NameAliasDescriptionTypeDefault
--interactive-ishow interactive prompts to customise seedingbooleanfalse
--entriesPerTable-nnumber100

setup

The snaplet setup command is used to Initialize or connect an existing Snaplet project.

Usage

snaplet setup

snapshot

The snaplet snapshot command is used to manage snapshots.

Usage

snaplet snapshot [action]

capture

The snaplet snapshot capture command is used to capture a new snapshot.

Usage

snaplet snapshot capture [destination-path]

Command Flags

NameAliasDescriptionTypeChoicesDefault
--env--environmentEnvironment to use when capturing the snapshotstringcloud,locallocal
--message-mAttach a message to the snapshotstring
--subset--subset-pathPath to a subset config filestring
--tagsAttach tags to the snapshotarray
--transform-mode-tTransformation mode to apply to the snapshotstringstrict,unsafe,auto

create

The snaplet snapshot create command is used to create a snapshot in cloud.

Usage

snaplet snapshot create

Command Flags

NameTypeDefault
--jsonbooleanfalse

list

The snaplet snapshot list command is used to list all snapshots.

Usage

snaplet snapshot list

Command Flags

NameType
--tagsarray

restore

The snaplet snapshot restore command is used to restore a snapshot.

Usage

snaplet snapshot restore [snapshot-name|snapshot-path]

Command Args

NameDescriptionType
snapshot-namesnapshot-path

Command Flags

NameAliasDescriptionTypeDeprecatedDefault
--schema-onlySkip data, only restore schemabooleanfalse
--data-onlyRestore data only (keep the current schema and indexes)booleanfalse
--tagsFilter snapshots by tagsarray
--latestRestore the latest snapshotbooleanfalse
--yes-yPerforms a restore without a confirmation messagebooleanfalse
--db--db-namestring
--newbooleanfalse
--tablesSpecify which tables to restore data for (used with data-only)string

share

The snaplet snapshot share command is used to Share a snapshot.

Usage

snaplet snapshot share [snapshot-name|snapshot-path]

Command Args

NameDescriptionType
snapshot-namesnapshot-path

Command Flags

NameDescriptionTypeDefault
--no-encryptDisable encryptionbooleanfalse
--tagsFilter snapshots by tagsarray
--latestShare the latest snapshotbooleanfalse

subset

The snaplet subset command is used to manage subsetting.

Usage

snaplet subset [action]

setup

The snaplet subset setup command is used to configure subsetting.

Usage

snaplet subset setup

team

The snaplet team command is used to manage team configuration.

Usage

snaplet team [action]

create

The snaplet team create command is used to create a new team.

Usage

snaplet team create <name>

upgrade

The snaplet upgrade command is used to upgrade this binary.

Usage

snaplet upgrade

completion

The snaplet completion command is used to generate completion script.

Usage

snaplet completion