Configuration
The YAML config schema — projects, repos, run, env management.
Banyan reads ~/.config/banyan/config.yaml (or $BANYAN_CONFIG if set). One file, all projects.
Minimal example
Full example
Repo fields
| Field | Description |
|---|---|
name | Repo identifier (used in tmux pane titles, branch names) |
path | Main checkout location. Stored as ~/... for portability. |
baseBranch | Default base for merge/rebase (else detected from origin/HEAD) |
mergeStrategy | squash / merge / rebase. Default: squash |
copyOnWorktree | Files to copy from main checkout → fresh worktree on bn wt. Relative paths only, no ... |
loadEnvFiles | .env-style files to parse and inject as env vars at run-time |
run.command | Shell command for bn start to spawn |
run.port | Canonical port. Banyan probes from port + 1 to allocate per feature. |
run.portEnv | Env var your framework reads (PORT, SERVER_PORT, …) |
run.setup | One-shot before each run (npm install, bundle install) |
run.stopCommand | Clean-shutdown command, run by bn stop / bn cleanup |
run.env | Extra env vars. Supports {{<repo>.port}} cross-repo templating |
run.composePorts | <env-var>: <service>:<containerPort> — inject host port of a compose service |
run.presets | Named alternative commands. Switch via activePreset |
deployCommand | Per-repo deploy command |
type | git (default) or compose |
composeFile | For type: compose only — path to docker-compose.yml |
Editing the config
Three ways:
- Edit
~/.config/banyan/config.yamldirectly. YAML, comments preserved across reloads. - Via the dashboard Config tab. Edits go through a comment-preserving writer.
- Via CLI commands:
bn <project> add-repo,set-run,set-base.
copyOnWorktree + loadEnvFiles
Most stacks depend on at least one gitignored file (.env, local.properties, application-local.yml). On bn wt, banyan copies declared files into the fresh worktree. On bn start, it parses .env-style files and prepends each KEY=value to the run command's env.
Banyan's dynamic values override file values:
loadEnvFilescontent (lowest)- allocated port + composePorts
- declared
run.env(highest)
So a .env.local shipping SERVER_PORT=8080 is overridden by banyan's allocated port for parallel features.