-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mechanism to sync site env
vars to local process
#142
Comments
Hehe, this is what I thought #134 was talking about, mostly because I was reading into it the idea I already had in my head. Now, this is what I actually had in mind! I was thinking of some similar possible commands, like I've been toying with how to handle variables you don't want syncing with Netlify. Possibly a comment wrapper to limit the syncing to a section of the file. I also like the fact that you're authenticated as your Netlify user, so permissions are pretty clear - if you have permission to see/edit the variables in the Netlify UI, you have permission to sync them with the CLI. |
Love this idea. As a contribution to this conversation, I love how Kontena handles this. Here's my idea as a heavy cmdline user: $ netlify env:write FOO=bar # creates or overrides
$ netlify env:write BAZ=candy
$ netlify env:read FOO
FOO=bar
$ netlify env:ls
FOO=bar
BAZ=candy
$ netlify env:rm BAR
$ netlify env:push /path/to/env_in # overrides all
# or even $ netlify env:push | cat /path/to/env_in
$ netlify env:pull /path/to/env_out |
I like it, wouldn't be hard to add. |
Yeah it makes sense! Very similar to how heroku env vars work https://devcenter.heroku.com/articles/config-vars#accessing-config-var-values-from-code
(^ something like this) We want to try and keep command semantics similar. IE |
Any progress on this? |
@muhajirframe Not yet, sorry. |
@bcomnes how about now? Happy new year! 🥳 |
An app running in the terminal can't really manipulate terminal's env variables. You can just print them but the user will have to set them manually. Or they would need to do run |
We already have mechanisms for setting the remote env variables to Netlify Dev in both app server and functions server. Not sure what purpose this would serve. |
Closing this because a similar functionality already exists. (Read above 👆🏽). Feel free to reopen if not the case. |
We need a way to sync the Remote netlify sites build enviroment variables down to the local terminal
process.env
Not sure what the command is but something like
This would use the API to call into the site ID and pull back all the build env variables on
process.env
of the current terminal session.The text was updated successfully, but these errors were encountered: