Migrating from @dopplerhq/cli

reading time 5 mins

Migrating from the @dopplerhq/cli is simple and fast. Here you will learn about the new Enclave terminology and CLI commands.

Brew Installation

If you are installing the new Doppler CLI through brew, make sure to update the link after the installation.

brew install dopplerhq/cli/doppler
brew link --overwrite doppler

Terminology

Some of the Doppler terminology has changed with the Enclave branding. Here is a list of those changes.

OldNewExample
pipelineprojectBackend Project
stageenvironmentDevelopment, Staging, Production
environmentconfigprd_aws
variablesecretSTRIPE_API_KEY=sk_test_123456

Authentication

After installing the new Doppler CLI, your configuration (api key, pipeline, etc) will automatically be transferred over. If you are using the CLI for local development we highly recommend that you reauthenticate with the new login command.

$ doppler login

The login command will generate a new API key just for your machine, which can be revoked at any time.

Screenshot of CLI Tokens

If you would like to use an existing service token, that's supported too. You can pass in the token via configuration file, command line flag, or environment variable.

TypeOldNew
Local Configurationdoppler config:set key=<API KEY>doppler configure set token=<API KEY>
Flagdoppler --api-key=<API KEY>doppler --token=<API KEY>
Shorthand Flagdoppler -k <API KEY>doppler -t <API KEY>
EnvironmentDOPPLER_API_KEY=<API KEY> dopplerDOPPLER_TOKEN=<API KEY> doppler

Enclave Commands

All Enclave commands have been moved under the enclave command.

CommandOldNew
Run Programdoppler rundoppler run
Setup Directorydoppler setupdoppler enclave setup
List of Projectsdoppler pipelinesdoppler enclave projects
List of Environmentsdoppler stagesdoppler enclave environments
List of Configsdoppler environmentsdoppler enclave configs
List of Secretsdoppler variablesdoppler enclave secrets

Enclave Project and Config

To match the new terminology, we need new flags and environment variables for specifying the Enclave project and config.

Project

TypeOldNew
Local Configurationdoppler config:set pipeline=<PROJECT>doppler configure set enclave.project=<PROJECT>
Flagdoppler --pipeline=<PROJECT>doppler --project=<PROJECT>
Shorthand Flagdoppler -p <PROJECT>doppler -p <PROJECT>
EnvironmentDOPPLER_PIPELINE=<PROJECT> dopplerENCLAVE_PROJECT=<PROJECT> doppler

Config

TypeOldNew
Local Configurationdoppler config:set environment=<CONFIG>doppler configure set enclave.config=<CONFIG>
Flagdoppler --environment=<CONFIG>doppler --config=<CONFIG>
Shorthand Flagdoppler -e <CONFIG>doppler -c <CONFIG>
EnvironmentDOPPLER_CONFIG=<CONFIG> dopplerENCLAVE_CONFIG=<CONFIG> doppler