What’s Rex

Rex is a new type of terminal. It combines a native terminal app, built around the libghostty core, with a powerful multiplexer.

Your sessions run on a Rex server, so they keep going when you disconnect, and any device picks them up right where they are. Run a server on your Mac, a dev box, a build server or a homelab, and every one of them feels like localhost.

Install Rex to get started.

What Rex Does

Nothing is lost when something restarts. Restart an app and your sessions are there as you left them, with their full history. Restart the server, after an update or a reboot, and it brings back every session, tab and pane. Programs that support it, such as Claude Code, start again where they left off. See Session Restore.

Programs can tell Rex what they’re doing. With the Program Status Protocol, a program says whether it’s working, waiting on you, finished or failed. Rex shows it on the program’s tab and in the session picker, so you can tell which of your agents and builds need you without checking each one.

Everything can be scripted. The rex CLI opens sessions, splits panes, types into terminals and reads their screens. Lua scripts can do anything a client can, including reacting to events. Programs in any language can use the Server API.

Agents can use it too. Rex ships an agent skill so coding agents such as Claude Code and Codex can open tabs, run commands beside you and read the results.

It’s configured in Lua. Rex needs no configuration to start. When you want to change something, a single init.lua sets keyboard shortcuts, key sequences and modes, custom actions, and which programs resume.

The Server and the Apps

Rex comes in two parts.

The Rex server runs your shells and the programs in them. It keeps each terminal’s screen and history and keeps running when no app is connected. Rex for Mac runs one on your Mac for you. You can also install it on Linux, FreeBSD and Windows machines, such as a build box or a cloud VM.

A Rex client connects to servers and shows what’s running on them. The clients are:

  • Rex for Mac.
  • Rex for iOS, on iPhone and iPad.
  • Rex for Windows, in alpha.
  • The rex CLI, which scripts and agents use too.

A client can connect to several servers at once, over a Unix socket on the same machine, over SSH, or over Tailscale. See Remote Access for the details. The server keeps the terminals, so you can close an app, open another on a different device, and find everything where you left it.

Sessions, Windows and Blocks

Rex organizes your work like this:

  • A session is a group of related work, such as one project. It keeps running whether or not anything is looking at it.
  • A window is a tab within a session. It holds a layout of blocks.
  • A block is one pane in a window. Today a block is always a terminal.

Every one of these has an ID that never changes, and can have a label you choose. The CLI, scripts and agents use them to say what they act on. See Taxonomy.