A terminal multiplexer for managing OpenCode sessions.
opencode-multiplexer-2026-04-12_21.17.32.mp4
Cargo:
cargo install ocmux-rs
Homebrew:
brew tap joeyism/ocmux
brew install ocmux
Shell (macOS / Linux):
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/joeyism/ocmux-rs/releases/latest/download/ocmux-rs-installer.sh | sh
Run ocmux in your terminal. The sidebar lists active OpenCode sessions sorted by most recently updated. The main pane shows the attached session's terminal output.
- Press
Enterto attach to a top-level session - Press
Tabto expand/collapse child sessions - Press
vto open a read-only conversation view (see below) - Press
sto collapse the sidebar for more screen space - Click a sidebar row to select it
| Key | Action |
|---|---|
j / Down |
Move down |
k / Up |
Move up |
Enter |
Attach to session |
Tab |
Expand/collapse children |
s |
Toggle sidebar collapse |
Ctrl-h |
Hide/show sidebar panel |
/ |
Search and attach session |
r |
Refresh active session |
? |
Show help overlay |
q |
Quit (confirm with y) |
Ctrl-4 |
Toggle focus sidebar/main |
| Key | Action |
|---|---|
n |
Spawn new session |
t |
Create git worktree + spawn |
v |
Open read-only conversation view |
d |
Open diff view for session |
f |
Show files modified by session |
! |
Drop into shell in session directory |
c |
Commit/push modified files |
x |
Kill session (y confirm, n/Esc cancel) |
Press v from the sidebar to open a read-only view of the session's conversation history. The view polls the opencode database and renders messages, markdown, syntax-highlighted code blocks, and tool call status.
| Key | Action |
|---|---|
j / Down |
Scroll down |
k / Up |
Scroll up |
G |
Jump to end |
g |
Jump to top |
Ctrl-u |
Page up |
Ctrl-d |
Page down |
/ |
Search conversation |
n |
Next search match |
N |
Previous search match |
q / v / Esc |
Close view |
Mouse scroll is supported in the conversation view. Search is incremental — type to filter and Enter to confirm.
Press d from the sidebar to open a read-only view of the session's git diff. The view shows both tracked and untracked changes, preferring the opencode serve API when available and falling back to git diff otherwise.
| Key | Action |
|---|---|
j / Down |
Scroll down |
k / Up |
Scroll up |
G |
Jump to end |
g |
Jump to top |
Ctrl-u |
Page up |
Ctrl-d |
Page down |
/ |
Search diff |
n |
Next search match |
N |
Previous search match |
q / d / Esc |
Close view |
Mouse scroll is supported in the diff view. Search is incremental — type to filter and Enter to confirm.
- Inspect conversation output — press
von any session (including child sessions) to watch the agent's progress in real-time without attaching to the PTY - Inspect changed files — press
dto open a diff view of all changes made by a session (tracked and untracked) - Inspect changed files (list) — press
fto see which files a session has created or modified - Drop into a shell — press
!to open a shell in the selected session's working directory - Commit session changes — press
cto review and commit/push all files modified by the session - Search and attach — press
/to search across all opencode sessions and attach to one
Keybindings and sidebar width are configurable via ~/.config/ocmux/config.json:
{
"sidebar_width": 30,
"keybindings": {
"up": "k",
"down": "j",
"spawn": "n",
"kill": "x",
"help": "?",
"worktree": "t",
"quit": "q",
"view": "v",
"files": "f",
"diff": "d"
}
}Keybinding values are single characters. Default sidebar_width is 30. Only the keys listed above are configurable; other bindings (Enter, Tab, /, s, Ctrl-h, r, !, c, Ctrl-4, arrows) are fixed.
Ctrl-4is the actual focus toggle binding (holdCtrland press4)scollapses the sidebar to a narrow width;Ctrl-hhides it entirely for maximum terminal spaceqprompts for confirmation before quitting (yconfirm,n/Esccancel)- Child sessions are expandable and selectable in the sidebar, but
Enterattach is not yet supported for child rows — usevto view their conversation instead cand!operate on top-level sessions onlycprompts for a commit message and then commits and pushes immediatelyrrefreshes the currently active session's PTY, not the selected sidebar row
Apache-2.0