Skip to content
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

[Suggestion]: Add function to push/pull env variables #21

Open
saltytostitos opened this issue Aug 24, 2024 · 2 comments
Open

[Suggestion]: Add function to push/pull env variables #21

saltytostitos opened this issue Aug 24, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@saltytostitos
Copy link

saltytostitos commented Aug 24, 2024

I'm a solo dev, so managing environment variables is annoying. I could use a service, but I like the idea of Nuxt HUB helping here.

Suggestion:
Add a CLI function nuxthub variables pull to download a fresh .env file of the variables stored on CF.
Additionally nuxthub variables push to upload variables (also reducing browser trips).

I often, lazily, use wrangler to download a config on a fresh pull: wrangler pages download config project_name and move my variables to some ignored filed. But, would be nice to save a few steps!

Notes
I know CF has a get at .../pages/projects/name that allows you to pull all the pages config data, and a patch at .../pages/projects/name to push data back.

I'm assuming you're using these calls inside the nuxthub backend.

How feasible is this? Also, potentially/alternatively, nuxthub could have a premium vault feature to make these things easier. Maybe?

@atinux atinux added the enhancement New feature or request label Aug 25, 2024
Copy link
Collaborator

atinux commented Aug 25, 2024

I like this idea a lot, one thing though is encrypted variables values won't be able to be imported.

I am thinking of env instead of variables:

nuxthub env pull

We will also need to make sure you can confirm the push if some variables will are overwritten though.

Also the possibility to set --production or --preview to force the environment.

@saltytostitos
Copy link
Author

I like the idea of this being a NuxtHub feature more than solely Cloudflare dependent, considering the direction NuxtHub is moving.

For context, I'm a solo dev and do not work with a team, so my env requirements are more loose.

I'm slowly migrating anything I have over to NuxtHub/CF, and the future of the platform is looking more appealing everyday!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants