A project’s secrets are organized into environmentsproduction, development, and any you add. Exactly one is active at a time, and most commands act on it. You can target another at any time with --env.

Default environments

New projects start with a development and a production environment, with production as the default. Anonymous projects begin with production; once a project is claimed, development is available too. You can create additional custom environments in Studio.

Each environment has its own secrets and its own access mode — a common setup is development readable and production run-only.

Listing and switching

The active environment is recorded in your .vexly file. List a project’s environments and switch which one is active:

vexly env ls           # list the project's environments
vexly env use development   # make 'development' the active environment

After switching, subsequent commands act on the new active environment until you switch again.

Targeting one environment

You don’t have to switch to act on another environment — pass --env <slug> to any secret command to target it for that one invocation:

vexly ls --env production
vexly set FEATURE_FLAG=on --env development
vexly run --env production -- node server.js

Commands

CommandWhat it does
vexly env lsList the project’s environments.
vexly env use <slug>Switch the active environment.
<command> --env <slug>Run a single command against a specific environment.

Next