Skip to main content

CLI Reference

auth

To manage your auth state use snaplet auth.

login

Description

Login with an access token.

Command Args

OptionRequiredDescription
[access-token]NoThe login command action will open a
link at Snaplet Cloud where you will find an access token.

config

To manage your project configuration in the cloud & locally use snaplet config

setup

Description

Setup local project configuration

Command Args

ArgumentRequiredDescription
[database-id]NoThe source database id.
[connection-string]NoThe target db connection string.

Command Flags

NameAliasTypeChoicesDefaultUsage
-—generate-booleantrue | falsetrueconfig setup --generate

generate

Description

Generate transformations file and stores it in your configuration file.

Command Flags

NameAliasTypeChoicesDefaultUsage
-—type--tstringtypedefs | transformationstypedefsconfig generate --t

pull

Description

Pull your configuration saved in the cloud into your local setup.

Command Flags

NameAliasTypeChoicesDefaultUsage
--type--tstringschemas | transformations | typedefs | schemasschemas | transformationsconfig pull --t <choice>

push

Description

Push your current local project config to the cloud.

Command Flags

NameAliasTypeChoicesDefaultUsage
-—type--tstringschemas | transformationsschemas | transformationsconfig push -t <choice>

snapshot

To manage snapshots use snaplet snapshot. [alias: ss].

capture

Description

Capture a new snapshot. [aliases: c]

Command Args

ArgumentRequiredDescription
[destination-path]No-

Command Flags

NameAliasTypeChoicesDefaultUsage
-—environment—envstringcloud | locallocalss c -env <choice>

create

Description

create a snapshot in cloud

Command Flags

NameAliasTypeChoicesDefaultUsage
--json-booleantrue | falsetruess create --json

list

Description

list all snapshots. [aliases: ls]

restore

Description

To restore a snapshot. [aliases: r]

Command Flags

NameAliasTypeChoicesDefaultUsage
—data-booleantrue | falsetruess r --data
—data-only-booleantrue | falsefalsess r --data-only
—tables-string--ss r --tables

proxy

To start a database proxy [aliases: dev]


db

To manage database

copy

Description

Makes a copy of the database. [aliases: clone | backup | cp]

Command Args

ArgumentRequiredDescription
[name]No-

upgrade

To upgrade the cli binary use snaplet upgrade.