https://github.com/ericclemmons/better-plexer
https://github.com/ericclemmons/better-plexer
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ericclemmons/better-plexer
- Owner: ericclemmons
- Created: 2026-02-03T02:18:54.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-02-03T05:17:42.000Z (5 months ago)
- Last Synced: 2026-02-03T18:41:57.638Z (4 months ago)
- Language: TypeScript
- Size: 21.5 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Better Plexer
A cloud-native chat multiplexer for AI coding sessions. Think of it as a workspace manager for CLI-based AI tools like Claude Code, OpenCode, or Codex — deployed on Cloudflare's edge infrastructure.
## Key Features
- **Multi-repo Sessions**: A single chat session can coordinate changes across multiple repositories and branches
- **Cloud-native**: Accessible from anywhere, deployed on Cloudflare Workers
- **Thin-client Design**: No GUI for chats — delegates to CLI tools. The UI is purely for workspace visibility
- **Sandbox Execution**: Uses Cloudflare Sandboxes for isolated execution and CI-like validation
- **Real-time Updates**: WebSocket-based terminal streaming and status updates
## Architecture
```
┌─────────────────────────────────────────────────────────────────┐
│ Cloudflare Access (Auth) │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Cloudflare Worker │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────────┐ │
│ │ Hono API │ │ Static UI │ │ Session Coordinator DO │ │
│ └─────────────┘ └─────────────┘ └─────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────────────────────┐
│ KV (Sessions) │ │ Cloudflare Sandboxes │
└─────────────────┘ │ ┌─────────┐ ┌─────────────┐ │
│ │ │ Primary │ │ Validation │ │
│ │ │ Sandbox │ │ Sandboxes │ │
▼ │ └─────────┘ └─────────────┘ │
┌─────────────────┐ └─────────────────────────────────┘
│ R2 (Storage) │ │
│ - Repos │ │
│ - Shared cfg │◄────────────────────────────┘
└─────────────────┘
```
## Workflow
1. **Create Session**: Name it, optionally link to a task (JIRA-123), pick your AI agent
2. **Add Repositories**: Mount 0-N repos with branch information
3. **Start Session**: Primary sandbox spins up with your chosen AI agent
4. **Work**: Agent makes changes across repos, creating branches as needed
5. **Validate**: Spawn validation sandboxes to run tests (like CI)
6. **Complete**: Push branches, create PRs
## Development
```bash
# Install dependencies
npm install
# Start dev server (runs Wrangler on port 8788)
npm run dev
# In a separate terminal, start the PTY server for local terminal support
node pty-server.mjs
# Type check
npm run typecheck
# Deploy to Cloudflare
npm run deploy
```
### Local Development Notes
- The dev server runs at `http://localhost:8788`
- The PTY server runs on port 7681 and provides terminal I/O for sessions
- Sandboxes in production use Cloudflare's container infrastructure; locally you'll need the PTY server running
- Drag-and-drop images onto the terminal to attach them (saved to `/tmp/plexer-images/`)
## Project Structure
```
├── src/
│ ├── index.ts # Main worker entry point
│ ├── types.ts # TypeScript types
│ ├── ui/
│ │ └── templates.ts # HTML templates for UI
│ └── durable-objects/
│ └── session-coordinator.ts # Real-time coordination
├── public/
│ └── styles.css # UI styles
├── wrangler.jsonc # Cloudflare configuration
└── package.json
```
## Configuration
Before deploying, you'll need to:
1. Create a KV namespace: `wrangler kv:namespace create SESSIONS`
2. Create an R2 bucket: `wrangler r2 bucket create plexer-storage`
3. Update `wrangler.toml` with the actual IDs
4. Set up Cloudflare Access for your domain
## Status
🚧 **Work in Progress**
- [x] Core data models
- [x] API routes for session CRUD
- [x] Gorgeous dark UI
- [x] Durable Object for coordination
- [x] Cloudflare Sandbox integration
- [x] Terminal component (ghostty-web)
- [x] Image drag-and-drop support
- [ ] SKILLS.md for agent instructions
- [ ] R2 bucket mounting
- [ ] Multi-repo coordination logic