phux keeps your shells running in a background server, the way tmux does.
The server also knows which panes run a coding agent, and whether each one is
working, idle, or waiting on you. Everything the terminal UI does, a command
can do too, with JSON output and exit codes.
It runs on your machines. There is no account and no hosted service.
Install
curl -fsSL https://phux.sh/install | sh
phux
Ctrl-Ad detaches. Your shells keep running; phux brings you back to
them. Homebrew works too: brew install no-phux/tap/phux.
macOS on Apple silicon, Linux on x86_64 or arm64, and Windows through WSL 2.
Every install option, including the
desktop app.
One server, every screen
The server owns the terminals. Anything that connects is a client, and they
all show the same sessions at once. The capture at the top is the terminal
UI, which is phux in the terminal you already use. These are the others:
Embedded in a web page. The browser client, live on phux.sh.
Phone. The same client, in a phone's browser.
And headless: every command in the sections below works with no screen
attached, which is how scripts and agents use it.
The browser client is an experiment that a server does not serve by default,
and native phone apps are not out yet. Clients has what
each one can and cannot do, and Embed phux covers
putting a terminal in your own app.
See which agent needs you
Start Claude Code, Codex, OpenCode, pi, or any other agent in a pane. From
any shell:
$ phux ls
web: needs you (1 agent waiting)
api: 1 running
infra: 1 running
$ phux agent list --json | jq -r '.agents[] | "\(.terminal) \(.agent.kind) \(.state)"'
@1 claude working
@2 codex blocked
@3 opencode idle
The sidebar shows the same thing, and Ctrl-Aq jumps to the next agent
that is waiting. To be told instead of looking:
Coding agents covers how the state is detected and the
integrations for each agent.
Drive a terminal from code
No terminal UI needs to be attached. Create a pane, run a command in it, and
get the output and the exit code back:
$ phux new --json -s api -- sh
{
"schema_version": 1,
"session": "api",
"terminal_id": 1
}
$ phux run @1 'ls /nope'
ls: cannot access '/nope': No such file or directory
exit=2 (152ms)
$ echo $?
2
snapshot reads a screen, send-keys types into it, wait blocks until
text appears or the pane goes quiet, and watch --json streams events. The
same operations are an MCP server (phux mcp), so an agent can use the
terminals you can see, and the documents, accessibility trees and screen
surfaces phux hosts (resource kinds).
host add sets the other machine up over the SSH access you already have.
After that its sessions and agents show up next to the local ones.
Remote machines has the details, including Tailscale.
Hand it to your agent
Run `phux skill` and follow it to work with my phux terminals.
phux skill prints the guide built into the binary you have installed, so it
always matches your version. There are plugins for Claude Code, pi, Oh My Pi,
OpenCode, and Grok. Using phux as an agent is
the path from install to a driven session.