Superlogical Rex
I’ve been chomping at the bit to write about Rex, the new terminal multiplexer from Superlogical, Mitchell Hashimoto’s latest team. I don’t think I’ve been this excited about an app since the early Obsidian days.
I do a fair amount of remote dev work. Before Rex, my workflow was built on three different pieces:
- a terminal emulator,
- a tool for remote access (SSH or Mosh), and
- a terminal multiplexer running on the remote machine (tmux or Herdr).
Rex combines all of that into a native app. Okay, really it’s a server and a client app, but once the server is running, it’s just the app you’re working with. The app is currently available for macOS, Windows, and iOS/iPadOS, and I believe Linux is on the way.
Having a native app built by a killer team provides so many little creature comforts that it’s difficult to keep track of them all. But here are some that have stuck out.
Connection management
Rex handles connecting to the remote server over SSH and, more importantly, reconnecting after network drops. This is a big leap toward a tool like Mosh, which tries to abstract the underlying mechanics away and have it feel like you’re always connected. Rex doesn’t do predictive text like Mosh, but I believe they have plans in that department.
In practice, this means I can open up my laptop from a long sleep, and by the time I’ve opened up Rex, it’s usually already reconnected my last remote session and is ready for me to pick up where I left off. I haven’t tested it yet on a really crappy connection, but on a typical day, I feel I get virtually all of the benefit of Mosh without any of the downsides (which I don’t have time to write about at the moment).
The Command key, unlocked
As terminal nerds know, the macOS Command key is mostly useless over SSH. I believe this is because traditional terminal protocols have no concept of that key. While I can use Command in the local terminal app to create new tabs and such, I can’t use it to do anything on the remote machine, such as manage tmux windows or panes. At least, not unless I resort to bespoke, client-specific scripting.
Since Rex brings all the pane management into the macOS app, now I can use the Command key for lots more stuff: splitting panes, zooming panes, creating new remote tabs (“windows” in Rex and tmux parlance), etc. This is super nice.
Some examples:
| Command | tmux | Rex |
|---|---|---|
| New tab / window | Ctrl-Spc + c |
Cmd-t |
| Jump to a window | Ctrl-Spc + <num> |
Cmd-<num> |
| Next / prev window | Ctrl-Spc + n / p |
Cmd-Shift-[ / ] |
| Split pane | Ctrl-Spc + v |
Cmd-Enter |
| Zoom pane | Ctrl-Spc + z |
Cmd-e |
| Close pane | Ctrl-Spc + x + y |
Cmd-w |
(Ctrl-Space is my “leader” in tmux. Abbreviated above for mobile viewports.)
None of these are stunning time-savers on their own.
On paper, they mostly save me one keystroke per command.
But it feels like more than just a keystroke.
Because with tmux, it’s really three distinct motions: leader sequence -> lift up fingers -> press next key.
Whereas in Rex, it’s a one-shot: Command-<key>.
Plus, Rex lets me bind the keys to feel similar to other macOS apps, minimizing cognitive load.
A nice little bonus: Command-Enter to create a new pane will automatically choose the size and location of a new pane, like tiling window manager.
This saves a couple brain calories of deciding where my next split should go.
Over hours of terminal work, the aggregate comforts really pile up.
Agent status indicators and notifications
If you have an agent working in a pane, the tab will show a status badge indicating if it’s working or done. This is the killer feature from Herdr, now in a native app. (To be fair, Herdr now has a native macOS app, too, and I don’t know anything about it.)
And when an agent is done thinking, you get a macOS notification. Clicking on it takes you back to the tab with the agent. Heck yes.
Better copy mode and scrolling
While tmux has perfectly serviceable copy and mouse modes, those functions feel quite a lot better in Rex.
Scrolling an individual pane with the Mac trackpad feels like scrolling in any other macOS app.
That’s super nice when scrolling back through agent conversations, for example.
Plus, I can scroll a secondary pane with the trackpad without losing focus of my active one.
That’s great for when I’m reading the output of my /proofread skill while editing a blog post, for example.
Selecting and copying text works better, too. Since the panes are managed by Rex, my selection doesn’t slop across pane boundaries like it does in tmux.
iPad availability
I just got access to the iPad version this week. This brings my iPad another step closer to a full-fledged work machine. I was struggling to find a good terminal emulator for the iPad. Now I get to use the same one I use on my “real” computers, and with all of the benefits described above.
In fact, I just switched over to my iPad to wrap this up because my laptop’s battery was dying. I launched Rex, and there I was, right back in the same tab. So flippin’ awesome.
There’s plenty more exciting stuff to write about, but I’m out of time!