🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

opencode-multiplexer

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencode-multiplexer - npm Package Compare versions

Comparing version
0.2.0
to
0.2.1
docs/output1.gif

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

+1
-1
{
"name": "opencode-multiplexer",
"version": "0.2.0",
"version": "0.2.1",
"type": "module",

@@ -5,0 +5,0 @@ "description": "Multiplexer for opencode AI coding agent sessions",

+71
-43

@@ -1,23 +0,38 @@

# OpenCode Multiplexer a.k.a. OCMux
# OCMux — OpenCode Multiplexer
A terminal multiplexer for [opencode](https://opencode.ai) AI coding agent sessions. Manage multiple parallel opencode instances across different projects from a single dashboard.
[![npm version](https://img.shields.io/npm/v/opencode-multiplexer?style=flat-square)](https://www.npmjs.com/package/opencode-multiplexer)
[![platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux-111827?style=flat-square)](#requirements)
[![license](https://img.shields.io/badge/license-ISC-0f766e?style=flat-square)](./LICENSE)
[![opencode](https://img.shields.io/badge/built%20for-opencode-7c3aed?style=flat-square)](https://opencode.ai)
## Overview
A terminal multiplexer for [opencode](https://opencode.ai) AI coding agent sessions.
When working with several opencode sessions simultaneously across different repositories, switching between terminal panes and losing track of which agent needs attention becomes a friction point. OCMux addresses this by providing a single TUI that aggregates all running opencode instances, shows their real-time status, and lets you jump between them efficiently.
**Run multiple opencode sessions across different projects from one fast, focused dashboard**—see which agents are working, idle, blocked on your input, or failing, then jump into the right session instantly.
Key capabilities:
When you're juggling several repositories at once, OCMux removes the friction of switching panes, losing context, and missing the moment an agent needs you.
- Dashboard view showing all running opencode sessions with live status indicators (working, needs input, idle, error)
- Expandable subagent tree per session, showing what child agents are running and their status
- Read conversation history for any session without attaching to it
- Send messages directly to sessions spawned via OCMux (which run a background HTTP server)
- Cycle through agent modes (Orchestrator, Chat, Code) and models per session
- Spawn new sessions with a folder picker, attaching immediately to the new session
- Kill instances directly from the dashboard
- Vim-style navigation throughout (j/k, Ctrl-U/D, G/gg)
## Demo
### Instantly see your current sessions and attach to existing work
## Requirements
![OCMux dashboard showing active opencode sessions across projects with quick attach support](docs/output1.gif)
> OCMux stays responsive to your existing working sessions and lets you attach to them without hunting through terminal panes.
### Track agent status, subagents, and sessions that need your attention
![OCMux session list showing working, idle, and needs-input states with expandable subagent trees](docs/output2.gif)
> Live status indicators show whether an agent is working, idle, or waiting on you. You can also inspect subagents and attach to them directly.
### Start new sessions or kill existing ones without leaving the dashboard
![OCMux creating and managing opencode sessions directly from the terminal dashboard](docs/output3.gif)
> Spawn a new session, jump into it immediately, or terminate a session right from OCMux.
## Install
### Requirements
- [Bun](https://bun.sh) runtime

@@ -28,10 +43,10 @@ - [opencode](https://opencode.ai) installed and available on `PATH`

### Install from npm
## Installation
```bash
npm install -g opencode-multiplexer
ocmux
```
Or run directly from source:
### Run from source

@@ -45,8 +60,26 @@ ```bash

## Features
## How it works
OCMux gives you a single TUI for managing several opencode sessions at once.
- Dashboard view showing all running opencode sessions with live status indicators (working, needs input, idle, error)
- Expandable subagent tree per session, showing what child agents are running and their status
- Read conversation history for any session without attaching to it
- Send messages directly to sessions spawned via OCMux (which run a background HTTP server)
- Cycle through agent modes (Orchestrator, Chat, Code) and models per session
- Spawn new sessions with a folder picker, attaching immediately to the new session
- Kill instances directly from the dashboard
- Vim-style navigation throughout (`j`/`k`, `Ctrl-U`/`Ctrl-D`, `G`/`gg`)
## Usage
### Overview
When working with several opencode sessions simultaneously across different repositories, switching between terminal panes and losing track of which agent needs attention becomes a friction point. OCMux addresses this by providing a single TUI that aggregates all running opencode instances, shows their real-time status, and lets you jump between them efficiently.
### How it works
OCMux discovers opencode instances in two ways:
**Existing sessions** (started outside OCMux): OCMux scans for running `opencode` processes using `ps`, identifies their working directories, and matches them to sessions in the shared opencode SQLite database at `~/.local/share/opencode/opencode.db`. These sessions are read-only in OCMux -- you can view the conversation history, but to send messages you must attach to the TUI.
**Existing sessions** (started outside OCMux): OCMux scans for running `opencode` processes using `ps`, identifies their working directories, and matches them to sessions in the shared opencode SQLite database at `~/.local/share/opencode/opencode.db`. These sessions are read-only in OCMux — you can view the conversation history, but to send messages you must attach to the TUI.

@@ -57,6 +90,5 @@ **Spawned sessions** (started via OCMux): When you create a new session from within OCMux, it starts `opencode serve --port X` as a background process. This exposes an HTTP API that OCMux uses to send messages directly, cycle agent modes, and list available models. The session persists after you leave the conversation view.

### Dashboard
## Dashboard
```
```text
OCMux

@@ -72,3 +104,3 @@ [Orchestrator] opus-4-6 [NORMAL] 73%

Status indicators:
#### Status indicators

@@ -82,5 +114,20 @@ | Symbol | Meaning |

Pressing Tab on an instance expands its subagent tree, showing what child sessions are running beneath it. Each child shows its agent type (`[fixer]`, `[explorer]`, etc.), title, model, and how long ago it was active. Subagents can themselves be expanded if they spawned further children.
Pressing `Tab` on an instance expands its subagent tree, showing what child sessions are running beneath it. Each child shows its agent type (`[fixer]`, `[explorer]`, etc.), title, model, and how long ago it was active. Subagents can themselves be expanded if they spawned further children.
### Spawned vs discovered sessions
Sessions spawned via OCMux (`n`) run as `opencode serve --port X` in the background. These sessions:
- Show `[live]` in the conversation header
- Support inline messaging from the conversation view
- Allow cycling agent modes with `Tab`
- Persist when you exit the conversation view
- Can be killed from the dashboard with `x`
Sessions discovered from existing `opencode` processes show `[read-only]`. These support:
- Full conversation history viewing
- Attaching to the TUI with `a` or `i` to send messages
- Agent mode display (read from the last assistant message)
## Keybindings

@@ -128,3 +175,2 @@

## Configuration

@@ -172,20 +218,2 @@

## Spawned vs discovered sessions
Sessions spawned via OCMux (`n`) run as `opencode serve --port X` in the background. These sessions:
- Show `[live]` in the conversation header
- Support inline messaging from the conversation view
- Allow cycling agent modes with Tab
- Persist when you exit the conversation view
- Can be killed from the dashboard with `x`
Sessions discovered from existing `opencode` processes show `[read-only]`. These support:
- Full conversation history viewing
- Attaching to the TUI with `a` or `i` to send messages
- Agent mode display (read from the last assistant message)
## Architecture

@@ -192,0 +220,0 @@