Skip to main content

Configuration files

The CLI's settings can be modified by a configuration file or via environmental variables. Snaplet typically operates against the database associated to your codebase, which means that you should add the configuration files to your repository, so that you don't have to set it up again.

Snaplet searches from the current working directory upwards for a .snaplet/config.json file.

Snaplet has a global configuration file (for authentication state), and a local per-project configuration file:

  • local, per project: <codebase>/.snaplet/config.json
  • global, <homedir>/.snaplet/config.json

Environmental variables

NameDescription
SNAPLET_ACCESS_TOKENAccess token to authentication as Snaplet Project (Cloud hosting)
SNAPLET_PROJECT_IDRun CLI commands against Snaplet Project (Cloud hosting)
SNAPLET_SOURCE_DATABASE_URLThe connection string used to introspect and capture snapshots
SNAPLET_TARGET_DATABASE_URLThe connection string used to restore snapshots
SNAPLET_CWDThe current working directory
SNAPLET_DISABLE_TELEMETRYSnaplet no phone home

Note that the variable SNAPLET_DATABASE_URL is deprecated in favor of SNAPLET_SOURCE_DATABASE_URL and SNAPLET_TARGET_DATABASE_URL.