Run it

The gateway

The gateway is Brigade running as a WebSocket server with no terminal UI of its own — the long-lived process that channel adapters, cron jobs, and sub-agent spawns all need running. The TUI auto-starts one if needed; for an always-on crew you run it yourself.

Run it#

terminal
$ brigade gateway run --port 7777 --host 127.0.0.1 --verbose$ brigade gateway status$ brigade gateway stop$ brigade gateway restart
FlagDefaultNotes
--port N7777Listen port (also BRIGADE_PORT)
--host A127.0.0.1Bind address — loopback by design
--verboseoffStream a one-line summary of every event
--quietoffSuppress the live console stream
--log-level Xinfotrace / debug / info / warn / error / fatal

Attach a TUI to a running gateway with brigade connect — same chat experience, but the agent runs in the gateway process, so you can disconnect and reconnect later while channels and cron keep running.

terminal
$ brigade connect --host 127.0.0.1 --port 7777

Staying up#

The gateway writes a heartbeat file. An out-of-process supervisor watches it and respawns the gateway if its event loop wedges, rate-limited so a crash loop cannot flap:

terminal
$ brigade gateway supervise

Install as a service#

Bring the gateway up at login with a per-OS service installer — launchd on macOS, systemd on Linux, Task Scheduler on Windows:

terminal
$ brigade gateway install      # register the service$ brigade gateway uninstall    # remove it

Loopback by default

The gateway binds to 127.0.0.1 on purpose. To reach it from another device, front it with something you trust (an SSH tunnel or a private network) rather than binding it to a public interface. Health-check a running gateway by pointing doctor at it with brigade doctor --host 127.0.0.1 --port 7777.