Is it possible to apply two config in the same time?

Is it possible to run two config in the same time when I run some code?

I sorted my secrets in two config separately.
There is no conflict secret name.

I want to use these two config at a time when I run “npm run dev”

I think you can do that because you can do separate tokens.

Hi @sole!

Welcome to the Doppler Community!

If you’re on either the Team or Enterprise plan, one way to accomplish this is by using Config Inheritance. That allows you to inherit secrets from one config in another config, so when you fetch the one doing the inheriting, it’ll get secrets from both configs.

If you’re not on those plans, you can accomplish this by chaining CLI invocations like this:

doppler run -p PROJECT_A -c CONFIG_A -- doppler run --forward-signals -p PROJECT_B -c CONFIG_B -- YOUR_COMMAND

The --forward-signals flag ensures any signals sent by the outside CLI command are forwarded to the application by the inside CLI command. It’s the default when output from the command isn’t going to a terminal, but it probably would be useful to specify explicitly for clarity (and for if you ever use it inside a terminal).

Config inheritance would be a more elegant solution if you’re able to use it, so that’s currently the recommended route, but the other option will certainly work!

Regards,
-Joel