How to switch between projects/configs using CLI?

In the accessing-secrets docs, it shows an example on accessing a secret:
doppler secrets get TLS_CERT --plain

When I try that, I get Doppler Error: You must specify a project. I am able to access the secret if specify the project and config
doppler secrets -p myproject -c dev TLS_SECRET --plain

How can I access the secret without specifying the project and config each time like in the example doc?

Also, how do I switch between configs using the dopper CLI so when I run dopper run -- command it’ll use a specific config?

Hi @dopmax!

Welcome to the Doppler Community!

You can set a specific project and config that will be used for a specific folder location locally by running doppler setup inside the directory for your project. After doing that, any doppler commands you run in that directory will use the project and config you specified.

If you want to switch to a different config from the one you set as the default temporarily, you would use the -c flag. That will temporarily override the default you set using doppler setup.