Reference
CLI
Run braid from your project's root. Commands other than
start talk to the stack already running there.
| Command | What it does |
|---|---|
braid start [name] | Start the stack, or one process in it. |
braid status | List every process with its state and resource use. |
braid logs [name] | Print or follow process output. |
braid restart <name> | Restart one process. |
braid stop [name] | Stop the stack, or one process in it. |
braid start
braid start # start the whole stack in the background
braid start --foreground # stay attached, streaming output
braid start --config ./dev.config.ts
braid start report # start one process in the running stack
Starts every process (except those with autoStart: false),
then prints a summary and returns. With a name, starts that one process
inside the stack that's already running, and does nothing if it's
already up.
| Flag | Effect |
|---|---|
--config <path> | Use this config file instead of ./braid.config.ts (or ./braid.config.mts). |
--foreground | Stay attached to the terminal until Ctrl+C. |
--daemon | Run in the background even if the config sets foreground: true. |
--no-watch | Ignore every watch (and beforeRestart) for this run. |
Fails if a stack is already running or starting in the same directory,
and stops a daemon that doesn't come up within
startupTimeoutMs.
braid status
braid status
braid status --json
โ api pid 40214 running cpu 1.8% mem 182.4 MB restarts 2 up 14m 3s
โ web pid 40215 running cpu 0.4% mem 96.1 MB restarts 0 up 14m 3s
โ report not started
Shows each process as running, stopped, or not started.
--json prints the same data as a JSON array, for scripts and
CI.
braid logs
braid logs # every process, interleaved
braid logs api --follow # stream new output
braid logs api --lines 50 # the last 50 lines
braid logs --json # one JSON object per line
| Flag | Effect |
|---|---|
--follow | Keep streaming new output until Ctrl+C. |
--lines <n> | Only the last n lines. |
--json | One {"name", "text"} object per line, colors stripped. |
braid restart
braid restart api
Stops and starts one process, then runs its onRestart hook and
restarts anything that dependsOn it, exactly as a file change
would.
braid stop
braid stop # the whole stack
braid stop api # one process; the rest keep running
Without a name, waits until every process has actually exited, so a
braid start straight after never overlaps the old stack. A
process still running after its stopTimeoutMs is killed.
Before signalling anything, stop checks that each recorded
process is still the one braid started. After a reboot, an unrelated
process that happens to reuse an old pid is left alone.