envshed env
Switch the active environment. Also available as envshed checkout.
Usage
envshed env <slug>
envshed checkout <slug>
Arguments
| Argument | Description |
|---|---|
slug | Environment slug to switch to |
Options
None.
Examples
# Switch to staging
$ envshed env staging
Switched environment: development → staging
# Same thing using the alias
$ envshed checkout production
Switched environment: staging → production
This updates the defaultEnv field in your .envshed.json. All subsequent commands (pull, push, run) will use the new environment.
The CLI verifies that the environment exists before switching. If the slug doesn't match any environment in the project, the command fails and lists available environments:
$ envshed env nonexistent
✖ Environment nonexistent does not exist.
Available: development, staging, production
Requires a .envshed.json file with org and project already set. Requires authentication (the environment is validated via API).