Managing Environments
RunEnv organizes your secrets into Projects and Environments. By default, every new project comes with three standard environments: Development, Staging, and Production.
Environment Types
- Development: Used by engineers running the application locally on their machines.
- Staging: Used for pre-production testing and QA servers.
- Production: Live environment serving real user traffic.
You can create custom environments (e.g., Preview, QA, Testing) from the RunEnv Dashboard.
Working with Environments Locally
When you run runenv init, you link your local directory to a specific environment.
runenv init --project my-app --env developmentThis ensures that when you execute runenv run -- npm start, it pulls the development secrets.
Overriding the Environment
If you want to temporarily run your application using secrets from a different environment (and you have the permissions to do so), you can use the -e flag:
runenv run -e staging -- npm startAdding and Updating Secrets
You can manage secrets directly from the RunEnv Dashboard. Changes are applied instantly. The next time an application starts via runenv run, it will receive the updated values.
If your application is already running, you will need to restart it to pick up the new environment variables, unless you have integrated the RunEnv SDK to handle live reloads or use Dynamic Secrets.