Project configuration
A project’s configuration is projects/<project>.toml in the
data directory. swarmed project add writes a commented template, and
swarmed project config <project> prints where it is. It is read again whenever a task needs it,
and a key Swarmed does not know is refused rather than passed over.
port_step = 100
[ports]web = 3000
[hooks]setup = "cp {{repo}}/.env .env && npm ci"start = "npm run dev -- --port {{port.web}}"
[env]WEB_PORT = "{{port.web}}"| Key | Default | Meaning |
|---|---|---|
branch_pattern |
{{user}}/{{task}} |
a new task’s branch; may use user, task and project |
base_branch |
origin’s default branch, else origin/main or origin/master |
the ref new tasks branch from |
ports |
none | named base ports |
port_step |
100 |
how far apart two tasks’ ports are |
max_stacks |
2 |
how many of the project’s stacks may run at once |
open_url |
the first local address start prints |
what “Open in browser” opens |
hooks |
none | setup, start, stop and teardown commands |
env |
none | environment for the hooks and the task’s agents |
Hooks, stacks and ports says when each hook runs, how ports are worked out, and
which {{variables}} hooks, env values and open_url may use.