1 unstable release
| 0.14.1 | Apr 11, 2026 |
|---|
#849 in Network programming
245KB
6.5K
SLoC
Routa Watch
routa-watch is a Rust terminal tool for tracking multiple coding-agent sessions inside one git repository.
It is TUI-first: the main path is a live terminal view that answers:
- which sessions are active
- which files each session most likely touched
- which files are still dirty in the worktree
- what changed recently from hooks, git hooks, and watcher events
Current Hook Setup
This repository already has a repo-local Codex hook config at .codex/hooks.json.
It currently forwards:
SessionStartUserPromptSubmitPreToolUsePostToolUseStop
And the tool matcher includes:
BashReadWriteEditMultiEditLSGlobGrepSearchWebSearch
That means a session can stay visible even when it is only reading/searching, not just writing.
Runtime Model
Routa Watch now starts in TUI mode by default. Running:
routa-watch --repo .
will:
- open the TUI
- ensure a repo-local runtime service is running in the background
- read live events from the local runtime feed
The runtime transport layers are attempted in this order:
- Unix domain socket
- Localhost TCP
- Append-only JSONL feed fallback
The current commands are:
routa-watchrouta-watch tuirouta-watch serverouta-watch hook <client> <event>routa-watch git-hook <event>
Recommended local flow:
cargo build -p routa-watch
target/debug/routa-watch --repo .
If local socket/port binding is unavailable, hooks automatically fall back to the JSONL feed. The title bar shows the current runtime mode as rpc:socket, rpc:tcp, or rpc:feed.
TUI Layout
Example layout:
RoutaWatch repo:routa-js branch:main agents:2 active:1 dirty:2 unknown:1 synced <1m ago
┌Files───────────────────────────────────────────────────────────────────────────────┐┌File Preview────────────────────┐
│ ALL FILES 2 files commits:5 ││ 1 fn render(frame: &mut Frame) │
│────────────────────────────────────────────────────────────────────────────────────││{ │
│> tui.rs ...h/src M +38 -5 4││ 2 // preview │
│ route.ts .../card D -12 5││ 3 } │
│ │└────────────────────────────────┘
│ │┌Details─────────────────────────┐
│ ││tui.rs │
│ ││crates/routa-watch/src │
│ ││Lines: 387 Size: 16.5 KB │
│ ││Git changes: 3 │
└────────────────────────────────────────────────────────────────────────────────────┘└────────────────────────────────┘
Tab focus ↑↓ select u unknown d preview/diff Pg scroll f follow:on T theme Esc clear q quit
Main regions:
Sessions: active, idle, stopped, and syntheticUnknownFiles:BY SESSION,GLOBAL,UNKNOWN-CONFLICTDetails: selected file metadata + preview/diffEvent Stream: hook / git / watch events
Keybindings
Tab: switch focusj/kor↑/↓: move selectionh/lor←/→: switch file pagerEnter: file previewD: diff views: cycle file modeT: cycle theme/: start search filterEsc: clear filter / exit search inputr: follow mode on/off1: all events2: hook events3: git events4: watch events[/]: previous / next diff hunkq: quit
Install Hooks
Build first:
cargo build -p routa-watch
Install templates:
ROUTA_WATCH_BIN=$PWD/target/debug/routa-watch ./crates/routa-watch/scripts/install-hooks.sh
This installs:
$HOME/.codex/hooks.json.git/hooks/post-commit.git/hooks/post-merge.git/hooks/post-checkout
In this repository, the repo-local .codex/hooks.json is already present and is the one you should inspect first.
Notes
routa-watch sessions,files,who, andwatchstill exist as legacy/debug commands.- The SQLite store is still present for fallback/debug paths, but the primary direction is realtime transport plus TUI.
- When multiple sessions touch the same worktree and attribution is ambiguous, Routa Watch intentionally shows
unknown/conflictinstead of faking certainty.
Dependencies
~31–46MB
~714K SLoC