Terminal UI for BoJ local-coord-mcp — gives every AI tool window a peer
ID in its title bar and lets you monitor and coordinate between instances in
real time.
bash /path/to/boj-server/coord-tui/install.shOne command does everything: builds the Zig coord adapter, builds this Rust
binary, installs both to ~/.local/bin/, starts the adapter as a systemd
user service, and patches /.bashrc//.zshrc with the shell hooks.
Open a new shell and you are done.
coord-tuiThe TUI opens with three panes:
| Pane | Contents |
|---|---|
Peers (top-left) |
Every registered peer — ID, tool kind, state, context, and current status.
Your own peer is marked with |
Claims (bottom-left) |
Every active task claim and the peer holding it.
Your own claims are marked |
Commands sidebar (right) |
TUI key reference, shell helpers, |
| Key | Action |
|---|---|
|
Claim a task — prompts for a task name. First caller wins (mutex). |
|
Set your status text — visible to all peers. |
|
Send a heartbeat on the selected claim (keep-alive / progress signal). |
|
Force a refresh now (auto-refresh runs every 5 s when registered). |
|
Switch keyboard focus between Peers and Claims panels. |
|
Move selection down. |
|
Move selection up. |
|
Toggle the Commands sidebar open/closed. |
|
Open the full help overlay (keys, shell helpers, session info). |
|
Quit. |
Visible on the right of the work panels whenever the terminal is wide enough (≥ 80 columns). Contains four collapsible sections:
-
TUI keys — every key binding at a glance.
-
Shell helpers —
coord-peers,coord-claims,coord-claim,coord-status,coord-whoami. -
just coord-\* —
just coord,just coord-peers,just coord-claims,just coord-claim,just coord-status,just coord-health. -
Register — how to register a new window manually or via hooks.
Press \ to hide it when you need the space. Press \ again to bring it
back. The footer shows [\]hide when the sidebar is visible and [\]cmd
when it is hidden.
After install, coord-hooks.sh is sourced automatically. These commands
work in any terminal without opening the TUI:
| Command | What it does |
|---|---|
|
Print all active peers with their kind and status. |
|
Print all active task claims and who holds them. |
|
Claim a task by name from the command line. |
|
Set your status message from the command line. |
|
Show your current peer ID and token (truncated). |
The hooks also wrap the tool launchers so registration happens automatically:
claude # registers this shell, sets window title to "claude [peer-abc]"
gemini # same for Gemini
cursor # same for Cursor
codex # same for OpenAI Codex
vibe # same for Vibe IDEIf boj-server is your working directory, just gives you the same
operations without sourcing any hooks:
| Recipe | What it does |
|---|---|
|
Open the interactive TUI. |
|
Register this terminal as |
|
List active peers. |
|
List active task claims. |
|
Claim a task. |
|
Set your status. |
|
Show peer ID and token. |
|
Check adapter liveness and stats. |
|
Rebuild the Rust binary. |
|
Full install (binary + hooks + service). |
|
Update shell hooks only. |
coord-tui --id --kind claude
coord-tui --id --kind gemini --context my-project
coord-tui --id --kind vibe --context vibeRegisters, writes ~/.cache/coord-tui/peer.env, sets the terminal window
title to the peer ID, prints it to stdout, and exits immediately. The shell
hooks call this before launching the real tool so the window title is set
before you see the tool’s output.
The env file contains:
BOJ_COORD_PEER_ID=<peer_id> BOJ_COORD_TOKEN=<token>
-
Open several terminal windows.
-
Run
claude(orgemini,cursor,codex,vibe) in each — each gets a unique peer ID visible in the title bar. -
In one window, run
coord-tuito monitor the full session. -
Peers claim tasks with
cin the TUI orcoord-claim <task>at the shell. The claim is a mutex — the first caller gets it; subsequent callers see who holds it. -
Each peer sends periodic heartbeats (
pin the TUI or via the MCPcoord_progresstool) to signal continued progress. -
When a peer finishes or crashes, its claim is released and becomes available again.
| Variable | Default | Purpose |
|---|---|---|
|
git repo name |
Context label sent to the registry. |
|
|
Client kind ( |
|
Adapter base URL. |
-
Rust (stable) — to build coord-tui
-
Zig — to build the coord adapter
-
systemd (optional but recommended) — automatic adapter lifecycle
-
~/.local/binon$PATH -
just(optional) — for thejust coord-*recipe shorthand
coord-tui is a thin Rust client over the local-coord-mcp HTTP adapter.
The adapter (cartridges/local-coord-mcp/adapter/) provides the
loopback-only HTTP surface; the Idris2 IsLoopback proof in
cartridges/local-coord-mcp/abi/LocalCoord/SafeLocalCoord.idr guarantees
at compile time that it cannot bind to any non-loopback address.
The TUI’s pure state-transition functions (next_index, prev_index,
clamp_selection) are deliberately isolated from I/O to support future
SPARK/Ada formal verification via the Idris2-ABI + Zig-FFI pattern used
throughout boj-server.
coord-tui itself lives in its own repository at
https://github.com/hyperpolymath/coord-tui and is included in
boj-server as a first-class companion tool.