---
title: "What's Rex"
canonical_url: https://www.superlogical.com/rex/docs/what-is-rex
---

# What's Rex

Rex is a new type of terminal. It combines a native terminal app, built around
the [libghostty](https://ghostty.org) 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](https://www.superlogical.com/rex/docs/installation.md) 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](https://www.superlogical.com/rex/docs/features/session-restore.md).

**Programs can tell Rex what they're doing.** With the
[Program Status Protocol](https://www.superlogical.com/rex/docs/build/program-status.md), 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](https://www.superlogical.com/rex/docs/automate/cli.md) opens
sessions, splits panes, types into terminals and reads their screens.
[Lua scripts](https://www.superlogical.com/rex/docs/automate/lua-scripts.md) can do anything a client can,
including reacting to [events](https://www.superlogical.com/rex/docs/automate/lua-events.md). Programs in any
language can use the [Server API](https://www.superlogical.com/rex/docs/automate/server-api.md).

**Agents can use it too.** Rex ships an [agent skill](https://www.superlogical.com/rex/docs/automate/agent-skill.md)
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`](https://www.superlogical.com/rex/docs/customize/config.md) sets
[keyboard shortcuts](https://www.superlogical.com/rex/docs/customize/keyboard-shortcuts.md),
[key sequences](https://www.superlogical.com/rex/docs/customize/key-sequences.md) and [modes](https://www.superlogical.com/rex/docs/customize/key-modes.md),
[custom actions](https://www.superlogical.com/rex/docs/customize/actions.md), and which programs
[resume](https://www.superlogical.com/rex/docs/customize/resume-rules.md).

## 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](https://www.superlogical.com/rex/docs/linux/installation.md), [FreeBSD](https://www.superlogical.com/rex/docs/freebsd/installation.md) and
[Windows](https://www.superlogical.com/rex/docs/windows/installation.md) 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](https://www.superlogical.com/rex/docs/automate/cli.md)**, 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](https://www.superlogical.com/rex/docs/linux/remote-access.md) 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](https://www.superlogical.com/rex/docs/automate/cli.md#taxonomy).
