Rmux v0.2.0: A Rust Terminal Multiplexer for the Agentic Era

A new terminal multiplexer called Rmux has hit version 0.2.0, promising a faster, more programmable alternative to tmux. Written in Rust, Rmux offers a tmux-compatible CLI, a typed SDK for programmatic control, and native support for Linux, macOS, and Windows—including Windows Named Pipes without WSL.

Rmux is designed for both humans and agents. You can use it as a drop-in tmux replacement for terminal work, or drive it from code for headless automation. The project's README explicitly targets "the agentic era"—long-lived AI agents that need persistent terminal sessions over SSH.

Why Another Multiplexer?

The author, helvesec, built Rmux because they wanted to "run long-lived agents over SSH without losing their terminals, while still being able to inspect, script, and orchestrate everything around them." Tmux works, but its scripting interface is limited to shell commands and key sequences. Rmux exposes a typed SDK (rmux-sdk) that lets you control sessions, panes, and windows from Rust code with async methods like pane.send_text() and pane.wait_for_text().

Key Features at a Glance

  • All 90 tmux commands implemented (as of v0.2.0, released 18 May 2026). The CLI is tmux-compatible: rmux new-session -d -s work, rmux split-window -h -t work, etc.
  • Persistent daemon architecture: A background daemon manages sessions, so you can detach and reattach without losing state.
  • Structured snapshots: pane.snapshot() returns a PaneSnapshot with columns, rows, and content—no parsing ANSI escape codes.
  • Ratatui widget: The ratatui-rmux crate provides a PaneWidget to render terminal panes inside Ratatui TUI applications.
  • Cross-platform: Unix PTY on Linux/macOS, ConPTY on Windows. IPC via Unix sockets or Windows Named Pipes.
  • Dual-licensed: MIT or Apache 2.0.

Architecture

Rmux is split into multiple crates:

  • rmux – CLI binary
  • rmux-sdk – Rust SDK for programmatic control
  • ratatui-rmux – Widget for Ratatui
  • rmux-server – Tokio-based daemon
  • rmux-pty – PTY allocation and child process control

All public surfaces share a single local protocol to communicate with the daemon. The SDK uses async/await with configurable timeouts.

Quickstart: CLI

rmux new-session -d -s work
rmux split-window -h -t work
rmux send-keys -t work 'echo "hello from rmux"' Enter
rmux attach-session -t work

Quickstart: SDK

Add to Cargo.toml:

[dependencies]
rmux-sdk = "0.2"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }

Then in your Rust code:

use rmux_sdk::{Rmux, EnsureSession, EnsureSessionPolicy, SessionName, TerminalSizeSpec};

#[tokio::main]
async fn main() -> rmux_sdk::Result<()> {
    let rmux = Rmux::builder()
        .default_timeout(std::time::Duration::from_secs(5))
        .connect_or_start()
        .await?;

    let session = rmux
        .ensure_session(
            EnsureSession::named(SessionName::new("work")?)
                .policy(EnsureSessionPolicy::CreateOrReuse)
                .detached(true)
                .size(TerminalSizeSpec::new(120, 32)),
        )
        .await?;

    let pane = session.pane(0, 0);
    pane.send_text("printf 'ready\\n' && sleep 1\n").await?;
    pane.wait_for_text("ready").await?;
    let snapshot = pane.snapshot().await?;
    println!("{}x{}", snapshot.cols, snapshot.rows);
    Ok(())
}

Ratatui Integration

use ratatui::{buffer::Buffer, layout::Rect, widgets::Widget};
use ratatui_rmux::{PaneState, PaneWidget};
use rmux_sdk::PaneSnapshot;

fn render(snapshot: PaneSnapshot, area: Rect, buffer: &mut Buffer) {
    let state = PaneState::from_snapshot(snapshot);
    PaneWidget::new(&state).render(area, buffer);
}

Configuration

Rmux reads .rmux.conf from standard locations:

  • Linux/macOS: /etc/rmux.conf, ~/.rmux.conf, $XDG_CONFIG_HOME/rmux/rmux.conf
  • Windows: %APPDATA%\rmux\rmux.conf, %USERPROFILE%\.rmux.conf, etc.

Verification

The project includes CI scripts for formatting (cargo fmt), linting (cargo clippy), and testing (cargo test). Upper-level crates use #![forbid(unsafe_code)]; unsafe code is isolated in lower-level runtime crates.

What's Next?

Version 0.2.0 is a public preview. The author warns that bugs are expected. The project is actively developed, with demos showing multi-agent orchestration (514 lines), terminal-to-browser mirroring (649 lines), and Playwright testing (1,495 lines).

If you're a Rust developer who needs programmatic terminal control, or you're building agent workflows that require persistent SSH sessions, Rmux is worth evaluating now. The SDK already provides a solid foundation for automation.

Install with:

curl -fsSL https://rmux.io/install.sh | sh

Or via Cargo:

cargo install rmux --locked