No description
  • TypeScript 74.9%
  • JavaScript 25.1%
Find a file
Yadunand Prem d90ea2245c
Add Rex Terminal BB plugin
Opens a Rex terminal for a BB thread's worktree. Each BB section gets
one Rex session, and each worktree gets one tab in that session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 11:48:36 -08:00
.gitignore Add Rex Terminal BB plugin 2026-11-04 11:48:36 -08:00
app.tsx Add Rex Terminal BB plugin 2026-11-04 11:48:36 -08:00
contract.ts Add Rex Terminal BB plugin 2026-11-04 11:48:36 -08:00
host.ts Add Rex Terminal BB plugin 2026-11-04 11:48:36 -08:00
LICENSE Add Rex Terminal BB plugin 2026-11-04 11:48:36 -08:00
package-lock.json Add Rex Terminal BB plugin 2026-11-04 11:48:36 -08:00
package.json Add Rex Terminal BB plugin 2026-11-04 11:48:36 -08:00
PLUGIN_OVERVIEW.md Add Rex Terminal BB plugin 2026-11-04 11:48:36 -08:00
README.md Add Rex Terminal BB plugin 2026-11-04 11:48:36 -08:00
server.ts Add Rex Terminal BB plugin 2026-11-04 11:48:36 -08:00
tsconfig.json Add Rex Terminal BB plugin 2026-11-04 11:48:36 -08:00
verify.mjs Add Rex Terminal BB plugin 2026-11-04 11:48:36 -08:00

Rex Terminal

Open a Rex terminal for a BB thread's worktree.

The plugin uses the BB section name for the Rex session. The plugin creates one tab for each worktree path. If the tab exists, the plugin adds a pane in that tab. Every new terminal starts in the thread's worktree path. The command appears as Rex: open terminal for this worktree in BB's command palette.

The plugin runs the Rex CLI on the worktree's BB host. Rex and the selected Rex app must already be available on that host. Threads without a section use the Threads session. The plugin remembers tab IDs so a shell's directory changes do not change the worktree mapping.

Settings

Setting Default Purpose
app /Applications/Rex Beta.app The path to the Rex app on the BB host. The plugin runs the Rex CLI from this app.
client empty The Rex app that shows the terminal. Run rex client ls to list labels. If empty, the plugin uses the local Rex app.

If the plugin cannot find the Rex CLI in the app path, it shows "Rex is required". To change a setting, run:

bb plugin config rex-terminal set app "/Applications/Rex.app"
bb plugin config rex-terminal set client <client-label>

Install

git clone https://git.yadunut.dev/yadunut/bb-rex-terminal.git
bb plugin install ./bb-rex-terminal

Build and check the plugin with:

npm run check
bb plugin build
node verify.mjs

To test a different Rex app path, set REX_APP. To test a Rex app other than the local one, set REX_CLIENT to its label.

The verification creates a temporary Rex session and closes it after the checks.

To open Rex with Command+Shift+Enter instead of BB's terminal:

bb settings keyboard set plugin:rex-terminal/open Mod+Shift+Enter --platform mac

To restore BB's terminal shortcut:

bb settings keyboard set plugin:rex-terminal/open disabled --platform mac
bb settings keyboard reset terminal.open --platform mac

License

MIT. See LICENSE.