Skip to content

NAMYUNWOO/claudeSpread

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Spread

If git made code shareable, claude-spread makes the development process itself shareable, agent to agent.

Securely share Claude Code session distillations between machines — over LAN or the internet.

What It Does

Claude Spread adds skills to Claude Code for sharing session context and project memory:

  • /claude-spread:distill-share — Generates a structured summary (distillation) of the current session and serves it to receivers, encrypted with a shared passphrase.
  • /claude-spread:distill-receive — Discovers and receives a distillation from a sender, decrypts it, and presents it so you can continue where the previous session left off.
  • /claude-spread:memory-share — Shares your project's auto memory (~/.claude/projects/<project>/memory/) over the network. Supports distilled (default) and raw (--raw) modes.
  • /claude-spread:memory-receive — Receives shared project memory and installs it into your local auto memory directory.
  • /claude-spread:sessions-share — Shares your Claude Code /resume sessions so another user can browse and pick one to continue working on.
  • /claude-spread:sessions-receive — Browses available sessions from a sender, lets you pick one, installs it locally, and you can /resume it immediately.

All data is encrypted end-to-end with AES-256-GCM. The passphrase never leaves your machines.

Sharing Modes

LAN Mode (default)

Uses mDNS (Bonjour) for zero-config discovery on the local network.

# Sender
/claude-spread:distill-share mypassphrase

# Receiver (same network)
/claude-spread:distill-receive mypassphrase

Firewall note: The sender opens a random TCP port for the receiver to connect. If your firewall blocks incoming connections, the receiver will discover the service via mDNS but fail to connect (timeout). Make sure the sender's firewall allows inbound TCP on the assigned port:

# Linux (ufw)
sudo ufw allow <port>/tcp

# Linux (iptables)
sudo iptables -A INPUT -p tcp --dport <port> -j ACCEPT

# macOS
# macOS will show a "Allow incoming connections?" dialog automatically.

Alternatively, use Relay Mode to bypass firewall restrictions entirely.

Relay Mode (remote)

Uses a WebSocket relay server for sharing across different networks. The relay is a dumb pipe — it cannot decrypt your data.

# Sender
/claude-spread:distill-share --relay mypassphrase
# → displays a 6-character room code

# Receiver (anywhere)
/claude-spread:distill-receive --relay --room <room_code> mypassphrase

Memory Sharing

Share your project's accumulated auto memory (patterns, conventions, debugging insights) with another machine or team member.

# Share memory (Claude distills and organizes it first)
/claude-spread:memory-share mypassphrase

# Share memory raw (all .md files as-is)
/claude-spread:memory-share --raw mypassphrase

# Receive memory
/claude-spread:memory-receive mypassphrase

Relay mode works the same way — add --relay to share across networks.

Session Sharing

Share your Claude Code /resume sessions — the receiver can browse your session list and pick one to continue working on in their own environment. Unlike distillation (which shares a summary), session sharing transfers the full conversation history so the receiver can /resume it exactly as if it were their own session.

Sender

# LAN mode (same network)
/claude-spread:sessions-share mypassphrase

# Relay mode (anywhere on the internet)
/claude-spread:sessions-share --relay mypassphrase

The sender flow:

  1. Claude scans all your local sessions and displays a numbered list
  2. You choose which sessions to share (all, or a subset like 1, 5, 7)
  3. You provide a passphrase for encryption
  4. The server starts and displays connection info (port for LAN, room code for relay)
  5. After the first receiver downloads, the server automatically shuts down

To keep the server open for multiple receivers, add --keep-open <minutes>:

/claude-spread:sessions-share --keep-open 10 mypassphrase

Receiver

# LAN mode
/claude-spread:sessions-receive mypassphrase

# Relay mode (use the room code from the sender)
/claude-spread:sessions-receive --relay --room <room_code> mypassphrase

The receiver flow:

  1. Connects to the sender and decrypts the session catalog
  2. Claude displays the available sessions with summaries, message counts, and dates
  3. You pick a session to download
  4. The full .jsonl session file is installed into your local Claude Code sessions directory
  5. Run /resume in Claude Code to continue the session immediately

Installation

From GitHub (recommended)

In Claude Code, run:

# 1. Add the marketplace
/plugin marketplace add NAMYUNWOO/claudeSpread

# 2. Install the plugin
/plugin install claude-spread@ai-spread

For relay mode, also install the websockets package:

pip install websockets

Local Development

git clone https://github.com/NAMYUNWOO/claudeSpread.git
claude --plugin-dir ./claudeSpread

Dependencies

  • Python 3.10+
  • cryptography: pip install cryptography
  • macOS or Linux (LAN mode uses dns-sd on macOS, avahi-utils on Linux)
    • Linux: sudo apt install avahi-utils
  • websockets (only for relay mode): pip install websockets

Project Structure

claudeSpread/
├── .claude-plugin/
│   ├── plugin.json              # Plugin manifest
│   └── marketplace.json         # Marketplace metadata
├── scripts/                     # Shared scripts
│   ├── common.py                # Crypto, protocol, message framing
│   ├── serve.py                 # TCP/WebSocket server (distill)
│   ├── receive.py               # TCP/WebSocket client (distill)
│   ├── serve_sessions.py        # Session sharing server (2-phase protocol)
│   └── receive_sessions.py      # Session sharing client (list/select)
├── skills/
│   ├── distill-share/SKILL.md
│   ├── distill-receive/SKILL.md
│   ├── memory-share/
│   │   ├── SKILL.md
│   │   └── scripts/bundle.py   # Memory directory → JSON bundle
│   ├── memory-receive/
│   │   ├── SKILL.md
│   │   └── scripts/install.py  # JSON bundle → memory directory
│   ├── sessions-share/SKILL.md
│   └── sessions-receive/
│       ├── SKILL.md
│       └── scripts/install_session.py  # .jsonl → local sessions
├── RELAY_SERVER_SPEC.md         # Relay server implementation spec
└── README.md

Security

  • AES-256-GCM encryption with PBKDF2-derived keys
  • Challenge-response authentication (HMAC-based)
  • The relay server never sees plaintext — it forwards encrypted bytes only
  • Brute-force protection: IP-based rate limiting in LAN mode

Relay Server

The default relay server is wss://relay.fireamulet.com. To self-host, see RELAY_SERVER_SPEC.md for the full implementation specification.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

18 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages