Real-time collaborative code editing over the local network. No server, no accounts, no pull requests.
ZeroPR lets two developers edit the same file simultaneously from their own VS Code instances. It discovers peers on the local network via mDNS, connects them over WebSocket, and syncs edits in real time using Yjs CRDTs. All traffic stays on your LAN.
- Zero-config peer discovery - finds collaborators on your network automatically via mDNS
- Real-time sync - conflict-free edits using Yjs CRDTs, no merge conflicts
- Cursor presence - see your collaborator's cursor and selections live
- Virtual filesystem - edits happen in a sandboxed
zeropr://document, original files are untouched until you explicitly save - Multi-file sessions - host can add multiple files to a single session
- Per-user undo/redo - undo history that doesn't clobber your collaborator's changes
┌──────────────┐ mDNS ┌──────────────┐
│ VS Code + │◄────────────────────►│ VS Code + │
│ Extension │ │ Extension │
│ (Yjs CRDT) │ │ (Yjs CRDT) │
└──────┬───────┘ └──────┬───────┘
│ HTTP + WebSocket │ HTTP + WebSocket
┌──────┴───────┐ relay ┌──────┴───────┐
│ Agent │◄────────────────────►│ Agent │
│ (Go) │ WebSocket │ (Go) │
└──────────────┘ └──────────────┘
Each machine runs a Go agent that handles discovery and message relay. The VS Code extension manages the Yjs document, binds it to the editor, and renders remote cursors.
| Component | Technology |
|---|---|
| Agent | Go, gorilla/websocket, brutella/dnssd |
| Extension | TypeScript, VS Code Extension API |
| Sync | Yjs, y-protocols, lib0 |
| Transport | WebSocket (binary) |
| Discovery | mDNS/DNS-SD (_zeropr._tcp) |
Prerequisites: Go 1.25+, Node.js 18+, pnpm, VS Code 1.109+
1. Start the agent
cd agent
go run .2. Run the extension
cd extension/zeropr
pnpm installOpen extension/zeropr in VS Code and press F5.
3. Collaborate
- Click the ZeroPR icon in the activity bar
- Click Start Search to discover peers
- Open a file, click the + icon next to a peer to invite them
- The peer joins from their Sessions panel
Both users see a [ZeroPR] tab with live-synced content. Original files are never modified unless you choose Save when ending the session.
agent/ Go agent (discovery, HTTP API, WebSocket relay)
extension/zeropr/ VS Code extension (Yjs sync, virtual filesystem, cursor presence)
docs/ Documentation
# Extension (383 tests across 8 suites)
cd extension/zeropr
pnpm install
tsx test/run-all.ts
# Agent (24 tests)
cd agent
go test ./...- Fork the repo
- Create a feature branch
- Make your changes
- Run the tests
- Open a pull request
MIT