### Example RMUX configuration Source: https://rmux.io/docs/get-started A sample rmux.conf file demonstrating configuration for prefix key, splits, and mouse support, mirroring tmux syntax. ```tmux # Prefix key set -g prefix C-a unbind C-b bind C-a send-prefix # Splits bind | split-window -h bind - split-window -v # Mouse set -g mouse on ``` -------------------------------- ### Rust SDK example: basic pane interaction Source: https://rmux.io/docs/get-started Shows how to start or connect to the daemon, ensure a session, write text, wait for it, and capture terminal state using the Rust SDK. ```rust let pane = session.pane(0, 0); pane.send_text("echo hello\n").await?; pane.wait_for_text("hello").await?; ``` -------------------------------- ### Install RMUX CLI on Windows Source: https://rmux.io/docs/get-started Installs RMUX using an Invoke-RestMethod command in PowerShell for Windows systems. ```powershell irm https://rmux.io/install.ps1 | iex ``` -------------------------------- ### Install RMUX via Cargo Source: https://rmux.io/docs/get-started Installs RMUX using the Cargo package manager, ensuring a locked version. ```bash cargo install rmux --locked ``` -------------------------------- ### Shell command example Source: https://rmux.io/docs/get-started Demonstrates creating a detached session, sending keys, waiting for a condition, capturing a pane, and attaching. ```bash rmux new-session -d -s demo rmux split-window -h -t demo rmux send-keys -t demo "printf 'test result: ok\n'; rmux wait-for -S demo-done" Enter rmux wait-for demo-done rmux capture-pane -p -t demo rmux attach-session -t demo ``` -------------------------------- ### Install RMUX CLI on macOS/Linux Source: https://rmux.io/docs/get-started Installs RMUX using a curl script for macOS and Linux systems. ```bash curl -fsSL https://rmux.io/install.sh | sh ``` -------------------------------- ### Rust SDK example: PaneSet orchestration Source: https://rmux.io/docs/get-started Demonstrates discovering related panes, collecting them into a PaneSet, broadcasting input, and asserting visible state across the group. ```rust let discovered = rmux .find_panes() .title_prefix("agent:") .running() .all() .await?; let agents = PaneSet::new(discovered.into_iter().map(|pane| pane.pane)); agents .keyboard() .type_text("Explain rmux in one sentence.") .await?; agents.keyboard().press("Enter").await?; agents.expect_all().visible_text_contains("rmux").await; let snapshots = agents.snapshot_all().await; ``` -------------------------------- ### Run echo hello Source: https://rmux.io/docs/examples/#/quickstart Starts or connects to the daemon, ensures a named session, writes literal terminal text, waits for rendered output, and captures the pane state. ```rust let pane = session.pane(0, 0); pane.send_text("echo hello\n").await?; pane.wait_for_text("hello").await?; ``` -------------------------------- ### Rust SDK example: terminal automation with locators Source: https://rmux.io/docs/get-started Illustrates using Playwright-style terminal locators, keyboard actions, visible assertions, and quiet-state waits on real RMUX panes. ```rust let pane = rmux .find_panes() .title("agent:claude") .one() .await?; pane.get_by_text("Ready").wait_for().await?; pane.keyboard().type_text("printf 'multiplexer ready\n'").await?; pane.keyboard().press("Enter").await?; pane.wait_for_load_state(TerminalLoadState::Quiet).await?; pane.expect_visible_text().to_contain("multiplexer").await?; ``` -------------------------------- ### Rust SDK example: Run detached session Source: https://rmux.io/docs/get-started Shows how to spawn a long-running process inside a fresh session and detach from it, allowing the daemon to supervise it. ```rust let session = rmux .ensure_session( EnsureSession::try_named("web")? .create_or_reuse() .detached(true) .shell("python3 -m http.server 8000"), ) .await?; ``` -------------------------------- ### Rust SDK example: Owned session cleanup Source: https://rmux.io/docs/get-started Illustrates creating a session owned by the application, choosing a cleanup policy (KillOnDrop, KillOnOwnerExit, or Preserve), and making cleanup explicit. ```rust let mut owned = rmux .owned_session(SessionName::new("agent-run")?) .replace_existing(true) .cleanup_policy(CleanupPolicy::KillOnOwnerExit) .await?; let _signals = owned.install_default_signal_handlers()?; let session = owned.session(); session.pane(0, 0).keyboard().type_text("cargo test\n").await?; owned.cleanup().await?; ``` -------------------------------- ### Add RMUX SDK to Rust project Source: https://rmux.io/docs/get-started Adds the rmux-sdk and tokio dependencies to a Rust project's Cargo.toml file. ```toml [dependencies] rmux-sdk = "0.3" tokio = { version = "1", features = ["macros", "rt-multi-thread"] } ``` -------------------------------- ### Attach Session Help Source: https://rmux.io/docs/cli Displays the help information for the attach-session command. ```shell rmux attach-session --help ``` -------------------------------- ### Rmux::broadcast Function Signature Source: https://rmux.io/docs/api The generated SDK reference for the Rmux::broadcast function. ```rust pub async fn broadcast(&self, panes: &[Pane], input: Input<'_>) -> Result ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.