Skip to main content

Env

Manage and apply environments across all repositories.

raid env [name|list]

Subcommands

CommandDescription
raid envShow the currently active environment
raid env <name>Apply a named environment to all repositories
raid env listList 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:

  1. Runs the profile-level environment tasks
  2. For each repository, writes its configured .env variables 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?"