Docs
Install an extension, press its key, and configure or remove it later. Each extension's README covers every feature in full.
Requirements
- Rex on macOS or Linux.
- Node 20 or later, as
nodeon thePATHyour login shell sets. - Whatever an extension lists in its own README: the github panel needs
ghorglab, logged in; the mcc panel needs mcc.
Install
Rex has no plugin manager. An extension is enabled when the init.lua Rex reads loads its Lua file and binds a key to its action. Each extension's install.js makes that edit for you.
1. Clone the repo once
git clone https://github.com/luongnv89/rex-extensions ~/.config/rex/rex-extensions
Any folder works. init.lua loads the extensions from where you cloned them, so keep the clone there.
2. Install the extensions you want
node ~/.config/rex/rex-extensions/github/install.js
node ~/.config/rex/rex-extensions/mcc/install.js
node ~/.config/rex/rex-extensions/tabs/install.js
node ~/.config/rex/rex-extensions/sshtab/install.js
Each one:
- adds three lines to
init.lua: a comment, adofilethat loads the extension, and arex.bindfor its key; - checks the result with
rex config check, and puts the old file back if the check fails; - saves the old file as
init.lua.bak-rex-<extension>; - runs
rex config reload, so the key works at once, with no restart.
The file it edits is REX_CONFIG when that's set, else $XDG_CONFIG_HOME/rex/init.lua, else ~/.config/rex/init.lua. It's created if it doesn't exist. Running install.js again when the extension is already there changes nothing.
3. Use it
Press the extension's key in any Rex pane:
| Extension | Key | Action | In the command palette |
|---|---|---|---|
| github | cmd+shift+g | github_panel | PR and Issue Panel |
| mcc | cmd+shift+u | mcc_usage | mcc Usage Panel |
| tabs | cmd+shift+l | tab_locations | Tab Locations (turns it off or on; it runs on its own) |
| sshtab | cmd+alt+t | same_host_tabs | Same-Machine Tabs (turns it off or on; it runs on its own). restore_agent_sessions, Restore Agent Sessions, turns agent session restore alone off or on. |
Without the key, pick the extension in Rex's command palette, or run its action from a shell with rex do ACTION, such as rex do mcc_usage. To check that an extension is enabled:
rex config check # init.lua loads without errors
rex keymap | grep mcc_usage # the key is bound to the action
First run
The shortest way to a working panel: clone, install the github panel, then press its key in a Rex pane inside a GitHub or GitLab repo.
git clone https://github.com/luongnv89/rex-extensions ~/.config/rex/rex-extensions
node ~/.config/rex/rex-extensions/github/install.js
install.js says which key it bound and where, such as PR and issue panel on cmd+shift+g: added to /Users/you/.config/rex/init.lua (backup: init.lua.bak-rex-github). Press that key: the panel of open pull requests and issues opens on the right of the tab.
Pick another key
When the default key is already bound in your init.lua, install.js takes the first free key from its own list and says which one it picked. To choose a key yourself, pass it:
node ~/.config/rex/rex-extensions/mcc/install.js ctrl+alt+u
It refuses a key your init.lua already binds. It can't see the shortcuts built into the Rex app, so if the key does something else there, remove the extension and install it again with another key.
Update, disable or remove
- Update: run
git pullin the clone. Every extension updates at once. A change to a pane's script shows the next time the pane opens; a change to an extension's Lua file needsrex config reload. - Disable or remove:
node ~/.config/rex/rex-extensions/mcc/install.js --removetakes the extension's lines out ofinit.luaand reloads the config. Runinstall.jsagain to bring it back.
Troubleshooting
install.jssaysNot installed: … already has problems:rex config checkalready reports a problem with yourinit.lua, so it changed nothing. Fix the problem it quotes, then run it again.Not installed: Rex rejected it: the check rejected the edited file, andinstall.jsput the old one back.- The key does something else:
install.jscan't see the shortcuts built into the Rex app. Remove the extension and install it again with another key. - Each extension's README has a Troubleshooting section for its own messages: github, mcc.
Configuration
| Variable | Used by | What it does |
|---|---|---|
REX_CONFIG | every install.js | The init.lua to edit. Else $XDG_CONFIG_HOME/rex/init.lua, else ~/.config/rex/init.lua. |
XDG_STATE_HOME | github and mcc panels | Where the panel keeps its state files. Default ~/.local/state. |
MCC_BIN | mcc and github panels | The full path to mcc, when it isn't on PATH or in the usual install folders. |
REX_GITHUB_STARTUP_MS | github panel | How long Resolve/Review waits for the agent to start, in ms. Default 3000. |
Every feature, per extension
- github: the pull requests and issues side pane, agent profiles, custom prompts, Auto-pilot, Merge and Close.
- mcc: the usage strip, API-key profiles, login warnings, details and machine stats.
- tabs: the machine in session names and the folder in tab names.
- sshtab: same-machine tabs and splits, and agent sessions after a restart.
- Development guide and architecture.