Sorin
Sorin4w ago

Is there an API / cli to read/update env vars?

I was wondering if there is a way to programmatically read and set env vars in a convex env. I am working on a way to automate deployment processes for projects with vercel, convex and clerk In convex I couldn’t find any reference on this feature
4 Replies
Convex Bot
Convex Bot4w ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
Sorin
SorinOP4w ago
looking at the git issues, I see this: CONVEX_DEPLOY_KEY should work for npx convex env set. You can set the environment variable (should be doable from CI machines). Doing something like: CONVEX_DEPLOY_KEY={paste key generated from dashboard} npx convex env set {KEY} {VALUE} And for dev: npx convex env set <name> [value]
correct? (https://github.com/get-convex/convex-backend/issues/123)
GitHub
Feature Request: dynamically set environment variables at deploy-ti...
Description CONVEX_DEPLOY_KEY does not seem to provide the necessary authorization to run convex env set. There does not seem to be a way to set environment variables when running on non-user machi...
ballingt
ballingt4w ago
@Sorin Are you asking for a way to do this without the CLI? That's coming before too long, but for now the CLI is the way to go
Sorin
SorinOP4w ago
Cli is ok. I just didn’t see this option when i the initial message 10x

Did you find this page helpful?