wmux-tmux (tmux shim)¶
wmux-tmux translates tmux commands into wmux SDK calls. It is not installed globally -- it is injected into child process PATH so that tools expecting tmux (e.g., Claude Code) interact with wmux instead.
Setup¶
Symlink or copy the wmux-tmux binary as tmux and prepend its directory to PATH for the child process:
Environment Variables¶
| Variable | Description |
|---|---|
WMUX_NAMESPACE |
Namespace for daemon isolation. Sets the socket path to ~/.wmux/<namespace>/daemon.sock. |
Commands¶
new-session¶
Create a new session.
| Flag | Required | Default | Description |
|---|---|---|---|
-d |
No | -- | Detached mode (always detached; flag is accepted but ignored) |
-s |
Yes | -- | Session name |
-x |
No | 80 |
Terminal width in columns |
-y |
No | 24 |
Terminal height in rows |
Uses $SHELL or /bin/sh as the shell.
send-keys¶
Send keystrokes to a session.
| Flag | Required | Description |
|---|---|---|
-t |
Yes | Target session name |
All remaining arguments are joined with spaces and sent as input.
Key Translation¶
Named keys are translated to escape sequences before sending:
| Key Name | Escape Sequence |
|---|---|
Enter |
\n |
C-c |
\x03 |
C-d |
\x04 |
C-z |
\x1a |
C-l |
\x0c |
Escape |
\x1b |
Tab |
\t |
Space |
(literal space) |
BSpace |
\x7f |
capture-pane¶
Capture and print the current pane content.
| Flag | Required | Description |
|---|---|---|
-t |
Yes | Target session name |
-p |
Yes | Print mode (output to stdout) |
Output¶
Raw viewport content written to stdout.
kill-session¶
Kill a session.
| Flag | Required | Description |
|---|---|---|
-t |
Yes | Target session name |
list-sessions¶
List all sessions.
Output¶
One line per session in the format:
has-session¶
Check whether a session exists.
| Flag | Required | Description |
|---|---|---|
-t |
Yes | Target session name |
Exit Codes¶
| Code | Meaning |
|---|---|
| 0 | Session exists |
| 1 | Session does not exist (or daemon not running) |
No output is written to stdout.