@claudecollab/cli 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +55 -68
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,124 +1,111 @@
1
1
  # ✦ claudecollab
2
2
 
3
- **Multiplayer for your Claude Code session.** You run one command. Friends open a link no install and drive the same Claude with you: live cursors, shared drafts, a visible queue, roles.
3
+ **Use Claude Code with your friends.** You run one command. Your friends open a link and can collaborate with the same Claude as you.
4
4
 
5
- Think **screen-share where they can type too**.
6
-
7
- <!-- demo gif goes here once captured: docs/demo.gif (host shares a session; a guest joins from a browser and types into the same Claude) -->
8
-
9
- ```mermaid
10
- flowchart LR
11
- H["you (host)<br/>terminal runs Claude"] <--> R["relay<br/>forwards bytes, nothing to disk"]
12
- R <--> HT["your host tab<br/>(admit · roles · pause · end)"]
13
- R <--> G["friends' browsers"]
5
+ ```
6
+ You a helper server Your friends
7
+ (you run Claude) <--> (passes messages) <--> (open a link)
14
8
  ```
15
9
 
16
- Your terminal stays plain Claude plus one status line. Everything multiplayer happens in the browser.
10
+ Your terminal looks like normal Claude, just one extra line at the bottom. All the sharing happens in the web browser.
17
11
 
18
- ## Host a session
12
+ ## Start a session
19
13
 
20
14
  ```bash
21
15
  npm install -g @claudecollab/cli
22
16
  collab
23
17
  ```
24
18
 
25
- That's it. `collab` wraps your normal `claude` and prints your room link on the status line — that's **your** tab (admit people, manage roles). The invite link lands on your clipboard — that's the one you share. Friends need nothing but a browser.
19
+ That's it. Run `collab` instead of `claude`. It works the same, but now it makes two links:
20
+
21
+ - A **private link** — that's your control panel (you let people in and manage them).
22
+ - A **share link** — this one gets copied for you. Send it to your friends.
23
+
24
+ Your friends just open the share link in a browser. They don't install anything.
26
25
 
27
26
  ## Two links — don't mix them up
28
27
 
29
28
  | Link | Who it's for |
30
29
  |---|---|
31
- | `…/room?host=abc` | **you only** opening it grants the host seat |
32
- | `…/room` | **share this** friends land on the request-to-join flow |
30
+ | the one ending in `?host=…` | **Just you.** Opening it makes you the boss of the room. |
31
+ | the plain one | **Share this.** Friends use it to ask to join. |
33
32
 
34
- The Invite button and your clipboard always hold the safe one.
33
+ The Invite button adds the plain one to your clipboard.
35
34
 
36
- Want a lock in front of the knock? Host with `collab --room-password <pw>` guests must enter it before their request ever reaches you. Admitting stays your call either way.
35
+ Want an extra guardrail? Start with `collab --room-password <pw>`. Then friends have to type the password before they can even ask to join. You still choose who gets admitted.
37
36
 
38
37
  ## Roles
39
38
 
40
- | Role | See | Type · answer asks · slash/bash | Admit · kick · pause · end |
39
+ | Role | Can watch | Can type | Can run the room |
41
40
  |---|---|---|---|
42
- | 👁 viewer | | | |
43
- | ✎ prompter *(default)* | | | |
44
- | ★ host | | | |
41
+ | 👁 viewer | yes | no | no |
42
+ | ✎ prompter *(normal)* | yes | yes | no |
43
+ | ★ host *(you)* | yes | yes | yes |
44
+
45
+ "Run the room" means let people in, remove them, pause, or end it.
45
46
 
46
- ## How it feels
47
+ ## How it works
47
48
 
48
- - The whole page is the terminal. Type with no draft open keys go **straight into Claude** menus, asks, everything.
49
- - **+ draft** (or double-click) opens a floating glass box. Everyone's caret shows; Enter sends; Esc steps out; drag to move, ◢ to resize, ✕ to delete.
50
- - Sent while Claude is busy? It waits in the **queue** chip edit or delete before it fires.
51
- - Scroll the mirror like a real terminal. Scrolling is shared — one screen for everyone.
52
- - Reloaded guests glide straight back in. Kicked guests lose the room; a room password (below) is the real lock if you need one.
49
+ - Everyone who can type gets their own little box at the bottom to write in. Type there and press Enter to send. Your box stays open, so you can keep going. If Claude is busy, your message will get queued.
50
+ - Want to write a message *together* with someone? Click **+ draft** to open a shared box you both type in.
51
+ - To talk to Claude directly (to approve y/n questions, answer questions, etc) click Claude's CLI text line.
52
+ - Everyone sees the same screen, and scrolling is shared.
53
53
 
54
- ## The one thing to really understand
54
+ ## Important note
55
55
 
56
- A guest prompt **runs on your machine, as you**. Admitting someone = trusting them with your Claude under the current mode. The relay sees your screen — treat a room like a screen-share, not a vault. You have **Pause** and **End** (with an optional `session.md` receipt).
56
+ When a friend types something, **it runs on your computer, as if you typed it.** So only let in people you trust. You can hit **Pause** anytime, or **End** to close the room.
57
57
 
58
- ## Self-host the relay
58
+ ## Run your own server (optional)
59
59
 
60
- `collab` defaults to the community relay at claudecollab.org. Rather run your own? The same package ships the server:
60
+ By default, `collab` uses our free server at claudecollab.org. Want to run your own instead? The same install includes it:
61
61
 
62
62
  ```bash
63
- collab-relay # local: ssh :2222 · web :8787
64
- collab --relay ssh://127.0.0.1:2222 # host through it
63
+ collab-relay # start your own server
64
+ collab --relay ssh://127.0.0.1:2222 # use it
65
65
  ```
66
66
 
67
- For a permanent public relay (Fly.io, any VPS — see `fly.toml` in this repo):
67
+ To put your server online for good (on Fly.io or any host — see `fly.toml`):
68
68
 
69
69
  ```bash
70
70
  fly launch --no-deploy
71
71
  fly secrets set HOST_KEY="$(collab-relay --make-key)"
72
- fly secrets set ROOM_SECRET="$(openssl rand -hex 16)" # optional: gate room creation
72
+ fly secrets set ROOM_SECRET="$(openssl rand -hex 16)" # optional lock (see below)
73
73
  fly deploy
74
74
  ```
75
75
 
76
- Two protections are built in:
76
+ Two safety features come built in:
77
77
 
78
- - **Room secret** — with `ROOM_SECRET` set, only hosts that present it (`CLAUDE_SHARE_SECRET` env or `--secret`) can create rooms. Guests are unaffected they enter with a room link.
79
- - **Identity pinning** the CLI pins the relay's ssh key fingerprint on first connect (like ssh's `known_hosts`) and refuses to connect if it ever changes. The relay prints its fingerprint at boot; pin explicitly with `--fingerprint SHA256:…`.
78
+ - **Room password** (`ROOM_SECRET`) — if you set this, only people who know it can *start* rooms on your server. People *joining* a room don't need it.
79
+ - **Server ID check** the first time you connect, the app remembers your server's ID. If it ever changes, it stops and warns you, so nobody can pretend to be your server.
80
80
 
81
- ## Flags
81
+ ## All the options
82
82
 
83
- | Flag | What it does |
83
+ | Option | What it does |
84
84
  |---|---|
85
- | `--relay <url>` | relay to use (`ssh://host:port`); default is the community relay |
86
- | `--no-relay` | solo mode no room, no relay, just Claude with the band |
87
- | `--room-password <pw>` | guests must present this before they can knock |
88
- | `--guests <role>` | role given to newly admitted guests (default `prompter`) |
89
- | `--secret <s>` | room-creation credential for a `ROOM_SECRET`-gated relay (or `CLAUDE_SHARE_SECRET` env) |
90
- | `--fingerprint <fp>` | pin the relay's ssh key explicitly (default: trust-on-first-use) |
91
- | `--cmd <program>` | wrap something other than `claude` |
92
- | `-- <args…>` | everything after `--` passes through to the wrapped program |
93
-
94
- ## Develop
95
-
96
- ```bash
97
- npm install
98
- npm test # full suite: protocol, relay, brain, e2e
99
- scripts/rig.sh # local relay + host wrapping a fake claude (UI work)
100
- ```
85
+ | `--relay <url>` | which server to use; defaults to ours |
86
+ | `--no-relay` | go solo — just Claude, no room, no sharing |
87
+ | `--room-password <pw>` | friends must type this before they can ask to join |
88
+ | `--guests <role>` | what new people can do when let in (default: prompter) |
89
+ | `--secret <s>` | the password for a locked server (or use `CLAUDE_SHARE_SECRET`) |
90
+ | `--fingerprint <fp>` | lock onto a specific server's ID |
91
+ | `--cmd <program>` | run something other than `claude` |
92
+ | `-- <args…>` | anything after `--` is passed to the program you're running |
101
93
 
102
94
  <details>
103
- <summary>Architecture</summary>
95
+ <summary>How it's built</summary>
104
96
 
105
- Three packages, plain ESM JavaScript, Node 22, no build step.
97
+ Three parts, plain JavaScript, no build step:
106
98
 
107
99
  ```
108
- packages/shared/ protocol.js host↔relay wire messages
109
- packages/relay/ server.js (ssh door) · web.js (browser door) · public/ (client)
110
- packages/cli/ bin/claude-share.js the "brain": drafts, queue, roles, gate
111
- test/ end-to-end: host + host tab + guest on localhost
100
+ packages/shared/ the messages the app and server send each other
101
+ packages/relay/ the server (one door for terminals, one for browsers)
102
+ packages/cli/ the main program you run the brain
112
103
  ```
113
104
 
114
- - The CLI wraps Claude in a PTY one row short — the bottom row is the status line.
115
- - State (busy/idle/ask) comes from injected Claude Code hooks, never screen-scraping. Ambiguity fails closed.
116
- - The relay persists nothing to disk — rooms, names, and any room password live only in process memory (kill it and the host reconnects; kill the host and the room is over). It does relay your screen bytes in transit, so treat it like a screen-share, not a vault — or self-host your own.
117
-
118
105
  </details>
119
106
 
120
107
  ## License
121
108
 
122
- [MIT](LICENSE). claudecollab is an independent open-source project not affiliated with or endorsed by Anthropic. *Claude* is a trademark of Anthropic, PBC; this tool wraps the official Claude Code client you already have installed.
109
+ [MIT](LICENSE) — free to use and change. This is an independent project, not made or approved by Anthropic.
123
110
 
124
- **TL;DR:** `npm i -g @claudecollab/cli` `collab` share the invite link. Guests need nothing. Roles keep control; prompts are real — admit people you trust.
111
+ Contributions are welcome! Please open a PR and add @ir272 as a reviewer.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudecollab/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"