hey there! I asked our fancy new AI bot in the docs, here's the answer:
Yes, you can set environment variables for your Convex project using the command line. The Convex CLI provides commands to manage environment variables. Here's how you can do it:
-
To set an environment variable:
npx convex env set <name> <value>
-
To list all environment variables:
npx convex env list
-
To get the value of a specific environment variable:
npx convex env get <name>
-
To remove an environment variable:
npx convex env remove <name>
These commands will modify the environment variables for your development deployment by default. If you want to set environment variables for your production deployment, you can use the --prod flag:
npx convex env --prod set <name> <value>
It's important to note that environment variables are set per-deployment, so you can have different values for the same key in your development and production environments.
For more detailed information on managing environment variables in Convex, you can refer to the Production > Environment Variables documentation.