Skip to main content

Profile Configuration

A profile is a YAML file that describes your full development environment: which repositories to clone, what to run during install, how to handle environments, and what custom commands are available to the team.

File format

name: "my-team"

repositories:
- name: "api"
url: "[email protected]:my-org/api.git"
path: "~/dev/api"
- name: "frontend"
url: "[email protected]:my-org/frontend.git"
path: "~/dev/frontend"

environments:
- name: "local"
variables:
- name: "LOG_LEVEL"
value: "debug"
tasks:
- type: Shell
cmd: "docker-compose up -d"
- name: "staging"
variables:
- name: "LOG_LEVEL"
value: "info"

install:
tasks:
- type: Print
message: "All repos cloned. Running global setup..."
- type: Shell
cmd: "brew bundle --file=~/Brewfile"

commands:
- name: "test-all"
usage: "Run tests across all repos"
tasks:
- type: Shell
cmd: "npm test"
path: "~/dev/api"
- type: Shell
cmd: "npm test"
path: "~/dev/frontend"

Adding profiles from a URL

raid profile add accepts a git repo URL, a raw file URL, or a local path:

# Shallow-clone a repo and import *.raid.yaml, *.raid.yml, and profile.json files found at the root
raid profile add https://github.com/my-org/raid-profiles

# Download a single profile file directly
raid profile add https://raw.githubusercontent.com/my-org/repo/main/team.raid.yaml

# Register a local file
raid profile add ./team.raid.yaml

Raid auto-detects the argument type. Git URLs (including git@ and .git-suffix URLs) are cloned; HTTP URLs ending with .yaml, .yml, or .json are downloaded directly; ambiguous HTTP URLs are probed with git ls-remote. Downloaded profiles are saved to ~/<name>.raid.yaml before registration.

Top-level fields

FieldRequiredDescription
nameYesUnique profile identifier
repositoriesNoList of repositories to manage
environmentsNoNamed environment configurations
installNoTasks to run after all repos are cloned
commandsNoCustom commands available via raid <name>
task_groupsNoReusable task sequences

Repositories

Each repository entry defines a repo to clone and optionally what to run after cloning.

repositories:
- name: "api"
url: "[email protected]:my-org/api.git"
path: "~/dev/api"
install:
tasks:
- type: Shell
cmd: "npm install"
FieldRequiredDescription
nameYesUsed to reference the repo (e.g. raid install api)
urlYesGit remote URL
pathYesLocal clone destination
install.tasksNoTasks to run after this repo is cloned

If a repository already exists at path, cloning is skipped.

Environments

Environments are defined as a list at the top level of the profile. Each environment has a name, optional variables, and optional tasks to run when it is applied.

environments:
- name: "local"
variables:
- name: "API_HOST"
value: "localhost"
tasks:
- type: Shell
cmd: "docker-compose up -d db"
- name: "production"
variables:
- name: "API_HOST"
value: "api.my-org.com"
tasks:
- type: Confirm
message: "Switch to production?"
FieldTypeRequiredDescription
namestringYesEnvironment name used with raid env <name>
variableslistNoVariables to set when the environment is applied
variables[].namestringYesVariable name
variables[].valuestringYesVariable value
taskslistNoTasks to run when this environment is applied

Individual repositories can define their own environment configuration in their raid.yaml. These are merged with the profile-level environment when applied. See Environments for details.

Install tasks

install.tasks runs after all repositories have been cloned and their own install tasks have completed. Use this for global setup that depends on all repos being present.

install:
tasks:
- type: Shell
cmd: "./scripts/link-configs.sh"
FieldTypeRequiredDescription
taskslistNoTasks to run after all repos are cloned

Commands

Custom commands are available as raid <name>. They run the defined task sequence.

commands:
- name: "deploy"
usage: "Deploy all services"
tasks:
- type: Shell
cmd: "./deploy.sh"
path: "~/dev/api"
out:
stdout: true
file: "~/logs/deploy.log"
FieldTypeRequiredDescription
namestringYesCommand name — invoked as raid <name>
usagestringNoDescription shown in raid --help
taskslistYesTasks to run
outobjectNoOutput configuration
out.stdoutboolNoShow stdout (default: true when out is omitted)
out.stderrboolNoShow stderr (default: true when out is omitted)
out.filestringNoAlso write all output to this file (supports $VAR)

Arguments passed after the command name are available as RAID_ARG_1, RAID_ARG_2, etc. See Custom Commands for details.

See Task Types for everything a task can do.

Task groups

Task groups are reusable task sequences referenced from commands using a Group task.

task_groups:
install-deps:
- type: Shell
cmd: "npm install"

commands:
- name: "setup"
usage: "Install dependencies"
tasks:
- type: Group
ref: "install-deps"
FieldTypeRequiredDescription
task_groupsmapNoMap of group name to task list
task_groups.<name>listYesTask sequence for this group

Groups are invoked with the Group task type:

FieldTypeRequiredDescription
refstringYesName of the task group to execute
parallelboolNoRun all tasks in the group concurrently
attemptsintNoRetry the group on failure up to this many times
delaystringNoWait between retry attempts (e.g. 1s, 500ms). Default: 1s

Per-repo configuration (raid.yaml)

Repositories can define their own commands and environments by committing a raid.yaml at their root. These are automatically merged into the active profile when it loads.

~/dev/api/raid.yaml
name: "api"
branch: "main"

install:
tasks:
- type: Shell
cmd: "npm install"

commands:
- name: "migrate"
usage: "Run database migrations"
tasks:
- type: Shell
cmd: "go run ./cmd/migrate"

environments:
- name: "local"
variables:
- name: "DATABASE_URL"
value: "postgres://localhost:5432/api_dev"
- name: "staging"
variables:
- name: "DATABASE_URL"
value: "postgres://staging-db.internal:5432/api"
FieldTypeRequiredDescription
namestringYesMust match the repository name in the profile
branchstringYesDefault branch to checkout on clone
install.taskslistNoTasks to run after this repo is cloned
commandslistNoRepo-scoped custom commands
environmentslistNoRepo-scoped environment variables and tasks

Registering and switching profiles

raid profile add ./my-profile.yaml # register a profile file
raid profile add ./raid.yaml # register a repo config as a single-repo profile
raid profile list # list all registered profiles
raid my-team # switch to the 'my-team' profile
raid profile remove my-team # remove a profile

Single-repo profiles

For projects that ship only a raid.yaml (no wrapping profile file), point raid profile add straight at the repo config:

raid profile add ./raid.yaml

Raid detects the repo schema and registers it as a single-repo profile named after the raid.yaml's name field. Switch to it with raid profile <name> like any other profile. The commands, environments, and install tasks declared in the raid.yaml become available at the top level.