https://github.com/zac15987/zplex
Terminal multiplexer desktop app for zpit — Go daemon + Electron shell with multi-panel xterm.js terminals
https://github.com/zac15987/zplex
conpty desktop-app electron golang pty terminal-multiplexer typescript websocket xterm-js
Last synced: 25 days ago
JSON representation
Terminal multiplexer desktop app for zpit — Go daemon + Electron shell with multi-panel xterm.js terminals
- Host: GitHub
- URL: https://github.com/zac15987/zplex
- Owner: zac15987
- License: mit
- Created: 2026-04-03T08:57:05.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-24T17:06:13.000Z (about 2 months ago)
- Last Synced: 2026-04-24T19:12:03.237Z (about 2 months ago)
- Topics: conpty, desktop-app, electron, golang, pty, terminal-multiplexer, typescript, websocket, xterm-js
- Language: TypeScript
- Size: 167 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zplex
A terminal multiplexer desktop app purpose-built for [zpit](https://github.com/zac15987/zpit).
Replaces scattered terminal tabs with a single Electron window — one fixed panel for zpit's TUI, plus dynamically spawned panels for each Claude Code agent.
## Quick Start
### Prerequisites
- Go 1.22+ (for daemon)
- Node.js 20+ (for Electron app)
- PowerShell 7+ (`pwsh`) — default shell for terminal sessions
### Build & Run
1. **Build the daemon:**
```bash
cd daemon
go build -o zplex-daemon.exe .
```
2. **Install and run the Electron app:**
```bash
cd app
npm install
npm run dev # dev mode (Vite + Electron)
npm run build # production build
npm run preview # run Electron with production build
```
## Architecture
**Daemon/Client model** (like tmux server/client):
- **Go daemon** — owns PTY sessions, exposes REST API + WebSocket on `localhost:17732`
- **Electron shell** — spawns the daemon, renders terminals via xterm.js
- Close the window, sessions survive. Reopen, resume instantly.
```
┌─────────────────────────────────────┐
│ zplex (Electron) │
│ ┌─────────┐ ┌──────────┐ ┌───────┐ │
│ │ zpit │ │ Claude 1 │ │Claude2│ │
│ │ (fixed) │ │ (dynamic) │ │(dyn.) │ │
│ └─────────┘ └──────────┘ └───────┘ │
└──────────────┬──────────────────────┘
WebSocket per panel
│
┌──────────────▼──────────────────────┐
│ Go Daemon (port 17732) │
│ PTY sessions + ring buffer + REST │
└─────────────────────────────────────┘
```
## Tech Stack
| Layer | Key Packages |
|-------|-------------|
| Go daemon | `aymanbagabas/go-pty`, `gorilla/websocket`, `net/http` |
| Electron | Electron v41, `electron-builder` |
| Frontend | `@xterm/xterm` v6, TypeScript, CSS Grid |
## License
[MIT](LICENSE)