Open clouedoc opened 2 years ago
The only solution fixes your issue is to make command "dopler source" return "eval $(doppler secrets download --format env --no-file --fallback-only)" command, which you should then write anyone to the terminal on you own again... because there is no such opportunity to apply env vars to your terminal just calling "dopler env" once.
@clouedoc Would creating a VS Code launch configuration that uses the Doppler CLI to run your application be another option?
Could you expand upon why you need the secrets exposed in your shell instead of to specific commands or scripts?
@ryan-blunden creating a VS Code launch configuration wouldn't be enough since some commands require dynamic input, and it would be a burden to create Launch Configurations each time.
e.g. testing a subportion of the app
We now have a vscode extension that you can use. Alternatively, I would suggest starting a new shell with your secrets injected, rather than injecting them into the existing shell. You can do so using doppler run -- bash
(replace bash
with your preferred shell).
That's great news! It's making me want to give Doppler another try 😃 . I'll close this issue since it should be "fixed" by the VSCode extension.
Is your feature request related to a problem? Please describe.
I wouldn't say that I like typing "doppler run " each time I use my CLI.
Describe the solution you'd like
I would like to have a
doppler source
command to source environment variables to the local terminal. I would also like to have a VSCode or ZSH integration that would do that for me.Describe alternatives you've considered
I wrote this command to download and source secrets to the local terminal:
I am still wondering how to run a command on each ZSH terminal open.
Final solution for me
I've created an alias that I run each time I want to seed environment variables to the current terminal:
Then, I can call it like this:
Additional context
My IDE is VSCode.