← 返回命令列表

Linux command

rmux 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Create a new detached session

rmux new-session -d -s [ci]

Send a command

rmux send-keys -t [ci] "[printf 'ok\n']" Enter

Capture the current pane

rmux capture-pane -p -t [ci]

Attach

rmux attach -t [ci]

List

rmux list-sessions

Wait for

rmux wait-for [ci-done]

Kill

rmux kill-session -t [ci]

说明

rmux is a Rust-implemented terminal multiplexer with a tmux-compatible command surface (all 90 commands implemented) and a typed SDK for driving sessions from code. It targets agent automation, headless CI workflows, and interactive use, running natively on Linux, macOS, and Windows (including Windows Named Pipes as a local transport). Sessions are persistent: a process started inside a session keeps running after the controlling terminal disconnects, and can be reattached, inspected, or driven later. Each session is a tree of windows and panes addressable by name or ID, mirroring tmux semantics so existing tmux configurations and muscle memory mostly carry over. Beyond classic multiplexing, rmux exposes structured snapshots and terminal-native locators that let an SDK or CLI consumer treat a TUI as an addressable surface, sending keystrokes and reading back stable representations of the screen. This makes it usable as a backing engine for AI agents or test harnesses that need to drive interactive programs deterministically.

参数

new-session, new
Create a session. -d detaches it; -s _NAME_ names it; -c _DIR_ sets the working directory.
attach-session, attach
Attach the current terminal to an existing session given by -t _TARGET_.
list-sessions, ls
Print all known sessions with their IDs and status.
send-keys
Send keystrokes or literal text to a target pane. Special keys (Enter, C-c, Escape, Up, ...) are recognized as separate arguments.
capture-pane
Dump the visible buffer of a pane. -p prints to stdout; -S _LINE_ / -E _LINE_ select a history range.
wait-for
Block until a named signal is fired with rmux wait-for -S _NAME_.
kill-session, kill-server
Terminate a session or the whole server.
-t _TARGET_
Target pane or session (e.g. ci, ci:0.1).
-s _NAME_
Session name when creating.
-d
Detach (do not attach the terminal to the new session).
-c _DIR_
Set the working directory for a new session or window.

FAQ

What is the rmux command used for?

rmux is a Rust-implemented terminal multiplexer with a tmux-compatible command surface (all 90 commands implemented) and a typed SDK for driving sessions from code. It targets agent automation, headless CI workflows, and interactive use, running natively on Linux, macOS, and Windows (including Windows Named Pipes as a local transport). Sessions are persistent: a process started inside a session keeps running after the controlling terminal disconnects, and can be reattached, inspected, or driven later. Each session is a tree of windows and panes addressable by name or ID, mirroring tmux semantics so existing tmux configurations and muscle memory mostly carry over. Beyond classic multiplexing, rmux exposes structured snapshots and terminal-native locators that let an SDK or CLI consumer treat a TUI as an addressable surface, sending keystrokes and reading back stable representations of the screen. This makes it usable as a backing engine for AI agents or test harnesses that need to drive interactive programs deterministically.

How do I run a basic rmux example?

Run `rmux new-session -d -s [ci]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does new-session, new do in rmux?

Create a session. -d detaches it; -s _NAME_ names it; -c _DIR_ sets the working directory.