coss.comshipyard

Config reference

Every field of .berth/config.json, kit.json, and the box's own config files.

.berth/config.json

A repository's config, committed at .berth/config.json. The same shape is a kit's config and a box's own config for a location. A missing file means no config; a file that doesn't parse is an error the app and CLI show. A guide is in project config.

services

agents

The built-ins are offered when their command is installed on the box: claude, codex, opencode (--prompt), gemini (-i) and cursor (cursor-agent).

hooks

The same shape is used in ~/.berth/hooks.json ({"hooks": [...]}) and in a plugin's manifest. See hooks.

flows

trigger

steps

Each step:

Variables and behaviour are in automations.

shots

Defaults for visual diffs. Flags on berthd shots compare override them for one run (--mask adds to mask).

login

The script prints one JSON object on stdout, at most 64 KB: {"cookies": [{"name", "value", "path"?, "httpOnly"?, "secure"?, "sameSite"?, "maxAge"?}], "redirect"?: "/path"}. One to 32 cookies; no domain (a cookie is set for the worktree's own address); sameSite is Lax, Strict or None; maxAge is 1 second to 400 days; redirect is a path on the worktree. Anything else, a non-zero exit or a timeout is an error that never quotes the output. A login comes from the kit, the box's own config, or the repository's trusted file in the main checkout, never from a worktree's own checkout. See personas.

How layers merge

A location's effective config is the repository's file, then its kit's config, then the box's own config for it:

Only the effective flows run: a flow replaced by id never does, and a replacement with enabled: false switches the flow off on that box. GET /v1/flows lists every layer's flows, with overridden: true on the replaced ones.

The repository's file counts only once it is trusted on the box, for its exact content (its SHA-256 hash); until then, and again after any change to it, only its ports apply and GET /v1/locations/{name}/config reports repo_trust: {state: "untrusted" | "changed", hash, wants}, with wants holding the whole file. A file that runs nothing (only ports, say) needs no trust. Trusting and untrusting run before:config.change gates and announce config.changed. See trusting a repository's config.

berth location config BOX/LOC prints the effective config, and what an untrusted file would run with its hash; --json shows each layer (repo, kit, local, effective, repo_trust). --trust HASH trusts the file as shown, --untrust stops running it.

kit.json

A kit's files are copied to each box it is applied to, and $BERTH_KIT_DIR points at them. Files starting with #! are made executable. See kits.

Task templates

~/.berth/templates/<id>.json on the laptop:

See task templates.

Box files

In ~/.berth/ on a box:

Changing env, flows, the guard or a location's config through the API runs before:config.change gates and announces config.changed. Where every file lives is in files and environment.

Last updated