CLI
start reads braid.config.ts from the current
directory by default — pass --config <path> to point
elsewhere. Every other command just talks to the pidfile of whatever's already
running, so it doesn't need the config again.
braid start
Forks every configured process, writes .braid/run.json (the
pidfile), and detaches as a background daemon — the CLI process exits
once every process has started; the daemon keeps running after.
braid start
braid start --config ./other.config.ts
Refuses to start if a pidfile from a still-running daemon already exists.
Pass --foreground to run attached to this terminal instead
— start then blocks, streaming every process's combined
output here, until Ctrl-C (or a braid stop from another
terminal) stops everything. A config's own foreground: true
makes this the default; --daemon forces the background daemon
regardless of what the config says.
braid start --foreground
braid start --daemon
braid status
Lists each configured process's name, PID, and whether it's currently alive.
braid status
braid logs
Prints a process's persisted, rotated log — or every process, interleaved, if no name is given.
braid logs # every process, interleaved
braid logs api # just "api"
braid logs api --follow # keep streaming new output
braid logs api --lines 50 # only the last 50 lines
braid stop
With no name: kills every process recorded in the pidfile (and their descendants), then removes it. Works even if the daemon itself has crashed, since it kills PIDs directly rather than asking the daemon to do it.
braid stop
With a name: stops just that one process through the running daemon's control server, leaving everything else (and the daemon itself) running. Unlike the bare form, this needs the daemon to actually be reachable — there's no direct-PID fallback for a single process, since the daemon's own in-process state (dependents, in-flight guards) has to be involved.
braid stop api
braid restart <name>
Stops and respawns one named process, then runs its own onRestart
hook (if any) and cascades to dependsOn dependents exactly as a
watch-triggered restart would. A name is required — there's no bare
whole-stack braid restart.
braid restart api
Can take a moment to return if onRestart keeps retrying. Prints an
error and exits non-zero if the daemon isn't reachable.
Flags
--config <path>—startonly; use a config file other than./braid.config.ts.--foreground—startonly; run attached to this terminal instead of forking a background daemon.--daemon—startonly; force the background daemon, overriding a config'sforeground: true.--follow—logsonly; keep the connection open and stream new output as it arrives.--lines <n>—logsonly; only print the lastnlines.