LOCAL-FIRST · ONE BINARY · NO DAEMON

Every worktree, its Rex session, and the agent that needs you.

rexws is a local-first CLI and TUI for the repositories you register. It maps each Git worktree to a named Rex session, joins in live agent state, and keeps your own workflow status. It derives the mapping from Git on every run and stores only what Git and Rex do not own.

pre-1.0 · macOS tested · Git 2.36+ · no telemetry

rexws is an unofficial personal companion to Rex. It is not affiliated with, endorsed by, or supported by Rex or Superlogical.

[ 80×24 · dashboard ]

rexws dashboard at 80×24. Six worktrees are grouped as In Progress, In Review, Ready, and Done. feat/auth is expanded to its agent and tests windows; badges read blocked (permission) ×2 and working; the header reads 6 workstreams, 3 live, 1 agent-blocked.
Six worktrees, three live Rex sessions, one blocked agent. feat/auth is expanded to its Rex windows.

THE PROBLEM

Rex knows sessions, windows, blocks, and program status. Git knows worktrees and branches. Neither knows which branch is the task you are on, which tab is running the agent you care about, or which branch is finished but unmerged. That index lives in your head, and it drifts.

rexws derives the session label from the worktree — <project>/<branch> — joins it with Rex's live session and agent state, and adds only the workflow metadata that belongs to you.

MENTAL MODEL

One worktree is one workstream. A workstream is rexws's row, not a Rex object or an Orca object. It points at the Rex session with the same label and carries your status and note.

Project (registered repo)
└── Worktree (Git)
    └── Workstream (rexws row)
        ├── Status + note          ← rexws
        └── Rex session (1:1 by convention)
            ├── Window (tab)
            └── Agent (pane reporting status)
GIT
Owns worktrees and branches.
REX
Owns sessions, windows, blocks, and program status.
REXWS
Owns registered projects, provider templates, status, and note.

No database, index, or cache. Every command recomputes the view. Status is your workflow stage, not Rex's agent state; a Ready workstream can have a blocked agent. The defaults are In Progress, Blocked, In Review, Ready, and Done; rename, reorder, or recolor them in config.json.

THE CORE LOOP (4)

Four keys cover the loop, at the 60×18 minimum and at 200 columns.

  • [l] / [→] Expand Reveal a workstream's Rex windows. The active window carries *.
  • [Enter] Switch Focus the session or the selected window. A stopped workstream opens its session.
  • [n] New worktree Run the project's provider, then verify exactly one worktree exists for the branch.
  • [c] Cleanup Preview every worktree and branch by risk. Safe items are opt-in; dirty and unmerged items need f. Nothing applies until you confirm.
15-second rexws demo: expand feat/auth to its Rex windows, move to main and switch it to a live Rex session, open the new-worktree form for feat/search, and preview cleanup with two safe items, one needs-review item, and four blocked items.
15 seconds. Expand, switch a stopped worktree to a live session, open the new-worktree form, and preview cleanup. Recorded against a scratch repository and a fake Rex; no live sessions or worktrees were touched.

INSTALL

No tagged release yet. Build from source with Go 1.27.4 or newer:

[ install ]
git clone https://github.com/danrabinowitz/rexws.git
cd rexws
go build -o ~/.local/bin/rexws ./cmd/rexws

rexws project add ~/code/acme/repo \
  --worktree-root ~/code/worktrees/repo
rexws new acme feat/auth --switch
rexws

Run rexws with no arguments for the TUI, or rexws tui.

Git 2.36+ (git worktree list --porcelain -z). cleanup's patch-equivalence proof needs Git 2.38+ (git merge-tree --write-tree). macOS is the tested platform; other platforms are untested.

Verified against Rex 0.1.0-preview.25 (API revision 24). There is no Rex version check; preview drift can break the adapter.

README: CLI, selectors, config, and the JSON contract.