Skip to content

Scripting bohay

bohay’s UI and CLI are the same surface: a local JSON socket (~/.bohay/bohay.sock). Whatever you can click, you can script.

Terminal window
bohay pane split --down # split the focused pane
bohay pane run 7 cargo test # run a command in pane 7
bohay pane read 7 # print a pane's recent output
bohay wait output 7 --match "passed" # block until text appears (exit 0; 2 on timeout)
bohay wait agent-status 7 --status done --timeout 600
bohay attach 7 # open the TUI fullscreen into one pane
bohay events # stream every status change (ND-JSON)

Every pane gets $BOHAY_PANE_ID and $BOHAY_SOCKET_PATH injected, so commands inside a pane default to that pane — an agent can split itself a scratch pane, run tests there, and wait on the result:

Terminal window
bohay pane split --down # agent makes itself a helper pane
bohay pane run "$id" ./repro.sh
bohay wait output "$id" --match "done" --timeout 300

wait exit codes are script-friendly: 0 = condition met, 2 = timeout.

bohay events emits newline-delimited JSON for agent status changes, task and lease activity, and more — ideal for a monitor loop or an orchestrator agent. See orchestration for the task/lease command set, and run bohay help for the complete reference.