Env
Manage and apply environments across all repositories.
raid env [name|list]
Subcommands
| Command | Description |
|---|---|
raid env | Show the currently active environment |
raid env <name> | Apply a named environment to all repositories |
raid env list | List all available environments |
Examples
Check the active environment:
raid env
Switch to staging:
raid env staging
List all available environments:
raid env list
What applying an environment does
When you run raid env <name>, raid:
- Runs the profile-level environment tasks
- For each repository, writes its configured
.envvariables and runs its environment tasks
This happens across all repositories at once. Switching contexts — local to staging, staging to production — is a single command.
Defining environments
Environments are defined in your profile and in individual repository raid.yaml files. See Environments for the full format.
profile.yaml
environments:
- name: "local"
variables:
- name: "LOG_LEVEL"
value: "debug"
tasks:
- type: Shell
cmd: "docker-compose up -d db"
- name: "staging"
variables:
- name: "LOG_LEVEL"
value: "info"
- name: "production"
tasks:
- type: Confirm
message: "Switch to production?"