https://github.com/joeyism/opencode-multiplexer-rs
Opencode Multiplexer
https://github.com/joeyism/opencode-multiplexer-rs
cargo multiplexer opencode opencode-ai opencode-plugin rust tui
Last synced: 3 days ago
JSON representation
Opencode Multiplexer
- Host: GitHub
- URL: https://github.com/joeyism/opencode-multiplexer-rs
- Owner: joeyism
- License: apache-2.0
- Created: 2026-04-09T04:10:05.000Z (9 days ago)
- Default Branch: main
- Last Pushed: 2026-04-14T02:38:12.000Z (4 days ago)
- Last Synced: 2026-04-14T04:24:24.861Z (4 days ago)
- Topics: cargo, multiplexer, opencode, opencode-ai, opencode-plugin, rust, tui
- Language: Rust
- Homepage:
- Size: 94.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ocmux
A terminal multiplexer for managing [OpenCode](https://opencode.ai) sessions.
## Install
**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
```
## Usage
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 `Enter` to attach to a top-level session
- Press `Tab` to expand/collapse child sessions
- Press `v` to open a read-only conversation view (see below)
- Press `s` to collapse the sidebar for more screen space
- Click a sidebar row to select it
## Keybindings
### Sidebar navigation
| Key | Action |
|----------|---------------------------|
| `j` | Move down |
| `k` | Move up |
| `Enter` | Attach to session |
| `Tab` | Expand/collapse children |
| `s` | Toggle sidebar collapse |
| `/` | Search and attach session |
| `r` | Refresh active session |
| `?` | Show help overlay |
| `q` | Quit |
| `Ctrl-4` | Toggle focus sidebar/main |
### Session actions
| Key | Action |
|-----|---------------------------------|
| `n` | Spawn new session |
| `t` | Create git worktree + spawn |
| `v` | Open read-only conversation view |
| `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) |
### Conversation view
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` | Scroll down |
| `k` | Scroll up |
| `G` | Jump to end |
| `g` | Jump to top |
| `Ctrl-u` | Page up |
| `Ctrl-d` | Page down |
| `v` | Close conversation view |
| `Esc` | Close conversation view |
## Advanced workflows
- **Inspect conversation output** — press `v` on any session (including child sessions) to watch the agent's progress in real-time without attaching to the PTY
- **Inspect changed files** — press `f` to 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 `c` to review and commit/push all files modified by the session
- **Search and attach** — press `/` to search across all opencode sessions and attach to one
## Configuration
Keybindings and sidebar width are configurable via `~/.config/ocmux/config.json`:
```json
{
"sidebar_width": 30,
"keybindings": {
"up": "k",
"down": "j",
"spawn": "n",
"kill": "x",
"help": "?",
"worktree": "t",
"quit": "q",
"view": "v",
"files": "f"
}
}
```
Keybinding values are single characters. Default `sidebar_width` is `30`. Only the keys listed above are configurable; other bindings (`Enter`, `Tab`, `/`, `s`, `r`, `!`, `c`, `Ctrl-4`, arrows) are fixed.
## Notes
- `Ctrl-4` is the actual focus toggle binding (hold `Ctrl` and press `4`)
- Child sessions are expandable and selectable in the sidebar, but `Enter` attach is not yet supported for child rows — use `v` to view their conversation instead
- `c` and `!` operate on top-level sessions only
- `c` prompts for a commit message and then commits and pushes immediately
- `r` refreshes the currently active session's PTY, not the selected sidebar row
## License
Apache-2.0