wcp Documentation

Installation

Quick Install

curl -fsSL https://wcp.dev/install | bash

This installs wcp and adds the /wcp command to supported AI tools (Claude

Code, Cursor, OpenCode).

Manual Install with Deno

deno install -gAf --name wcp https://raw.githubusercontent.com/umbrellamode/wcp/main/mod.ts

Update

wcp update

Commands

wcp (no arguments)

The simplest way to use wcp. When you run wcp with no arguments, it will:

WCP.md config
wcp

This is the recommended command for users who want to monitor what the AI agent

is running.

wcp dev

Auto-detect your project type and start a dev server.

wcp dev

Detects:

wcp <name> -- <command>

Create a wormhole and run a command.

# Start a Next.js dev server
wcp 3000 -- npm run dev

Start a Rust server

wcp api -- cargo run

Start any command

wcp logs -- tail -f /var/log/syslog

The name can be anything: dev, 3000, api, my-server.

wcp <name>

Connect to an existing wormhole.

# Connect to the wormhole named "dev"
wcp dev

Connect to wormhole "3000"

wcp 3000

When you connect, you'll see:

wcp list

List all active wormholes.

wcp list

Output:

Active wcps:
  • Port dev
  • Port 3000

• Port api (stale)

Stale wormholes are sockets that exist but the process has died.

wcp kill <name>

Terminate a wormhole.

wcp kill dev

wcp init

Generate AI agent documentation for your project.

wcp init

Creates or updates:

wcp update

Update wcp to the latest version.

wcp update

wcp help

Show help message.

wcp help

How It Works

Architecture

┌─────────────────┐     Unix Socket      ┌─────────────────┐
│   AI Agent      │ ←─────────────────→  │    wcp daemon   │
│   (Terminal 1)  │                      │                 │
└─────────────────┘                      │  ┌───────────┐  │
                                         │  │  Child    │  │
┌─────────────────┐     Unix Socket      │  │  Process  │  │
│   You           │ ←─────────────────→  │  │ (npm dev) │  │
│   (Terminal 2)  │                      │  └───────────┘  │
└─────────────────┘                      │                 │
                                         │  Ring Buffer   │
┌─────────────────┐     Unix Socket      │  (1000 lines)  │
│   Another User  │ ←─────────────────→  │                 │
│   (Terminal 3)  │                      └─────────────────┘

└─────────────────┘

Data Flow

Message Protocol

All messages use a 4-byte big-endian length prefix followed by JSON:

┌──────────────┬─────────────────────────────┐
│ Length (4B)  │ JSON Payload                │

└──────────────┴─────────────────────────────┘

Message types:


Examples

Development Server

Start a dev server that others can monitor:

# Terminal 1 (AI Agent)
wcp dev -- npm run dev

Terminal 2 (You)

wcp dev

Named Sessions

Use descriptive names for multiple services:

# Start backend
wcp backend -- cargo run

Start frontend

wcp frontend -- npm run dev

Start database

wcp db -- docker-compose up postgres

Monitoring Logs

Watch log files through wcp:

# Terminal 1
wcp logs -- tail -f /var/log/app.log

Terminal 2

wcp logs


Configuration

Socket Location

Sockets are stored in ~/.wormhole/:

~/.wormhole/
├── wormhole-dev.sock
├── wormhole-3000.sock

└── wormhole-api.sock

Buffer Size

The ring buffer holds the last 1000 lines of output. This is currently not

configurable.


Troubleshooting

"Wormhole already exists"

A socket file exists for that name. Either:

"Connection refused" or "stale" socket

The daemon died but the socket file remains. Kill and restart:

wcp kill <name>

wcp <name> -- <command>

Socket permission errors

Ensure ~/.wormhole/ is writable:

chmod 700 ~/.wormhole

For AI Agents

When using wcp from an AI coding agent:

logs"