slopstream 0.0.0-stage → 0.2.0

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.
package/SETUP-MAC.md ADDED
@@ -0,0 +1,137 @@
1
+ # Setup on macOS (fast path)
2
+
3
+ > Using the hosted relay? You don't need this guide: see the Quick start in README.md. This guide is for self-hosting over Tailscale.
4
+
5
+ *Part of [Slopstream](./README.md) · [Setup on Windows](./SETUP-WINDOWS.md) · [Product overview](./product.md) · [Testing guide](./TESTING.md) · [Contributing](./CONTRIBUTING.md)*
6
+
7
+ Minimum commands to get linked. No explanations, no optional steps; if something breaks or you want to know *why*, see [README.md](./README.md) and [TESTING.md](./TESTING.md). Requires macOS 13+, Node 20+, Claude Code ≥2.1.80.
8
+
9
+ **On Windows?** Use [SETUP-WINDOWS.md](./SETUP-WINDOWS.md) for PowerShell commands. If you have Git for Windows, every command in *this* file also runs unchanged in Git Bash; just skip the `caffeinate -i`, which is a macOS program.
10
+
11
+ One person is the **host** (runs the relay). Everyone else is a **joiner**. Do Part 1 as everyone, then Part 2 (host) or Part 3 (joiner) as your role.
12
+
13
+ **Mixed Mac and Windows is fine**: the relay and the bridge speak the same protocol on both. Each person follows the file for their own machine. A **Mac host with a Windows joiner, Claude Code to Claude Code, is tested**.
14
+
15
+ ---
16
+
17
+ ## 1. Everyone
18
+
19
+ - **Claude Code**, logged in with a claude.ai account:
20
+ ```bash
21
+ claude --version # need >= 2.1.80; if missing: curl -fsSL https://claude.ai/install.sh | bash
22
+ ```
23
+ - **Tailscale**: download from <https://tailscale.com/download>, open it, sign in with your own account (not shared). Note the `100.x.x.x` address it gives you.
24
+
25
+ ---
26
+
27
+ ## 2. Host
28
+
29
+ Get Slopstream, pick one:
30
+
31
+ ```bash
32
+ # Option A: Claude Code plugin (run inside a Claude Code session, then in a terminal)
33
+ /plugin marketplace add mrlegendary25/slopstream
34
+ /plugin install slopstream@slopstream
35
+ # run /slopstream:get-started in that session (it prints the install path). Then, in a terminal:
36
+ cd <path-it-printed> && npm install && npm link
37
+ ```
38
+ ```bash
39
+ # Option B: clone it yourself (terminal only)
40
+ git clone https://github.com/mrlegendary25/slopstream.git && cd slopstream && npm install && npm link
41
+ ```
42
+
43
+ Share your Tailscale machine with each joiner: <https://console.tailscale.com/admin/machines> → **⋯** on your machine → **Share** → send them the invite link.
44
+
45
+ ```bash
46
+ DATA_DIR=~/.slopstream-relay node relay/admin.js add-user <you>
47
+ DATA_DIR=~/.slopstream-relay node relay/admin.js add-user <joiner> # repeat per joiner
48
+ HOST=<your-tailscale-ip> DATA_DIR=~/.slopstream-relay caffeinate -i node relay/server.js
49
+ ```
50
+ (leave that running; open a new terminal for the rest)
51
+
52
+ ```bash
53
+ slopstream setup ws://<your-tailscale-ip>:8787 <you> <your-token>
54
+ slopstream pair-create projX
55
+ ```
56
+ Send the joiner the code it prints; type `y` when they accept.
57
+
58
+ ```bash
59
+ cd ~/path/to/your/project
60
+ slopstream init projX
61
+ claude --dangerously-load-development-channels server:slopstream
62
+ ```
63
+
64
+ **Claude Code asks before it will use a project's MCP server.** On that first start, approve the prompt about this project's servers. Until you do, `slopstream` stays at `⏸ Pending approval` and `/mcp` does not list it. Check with `claude mcp list` from the project folder; if you dismissed the prompt earlier, run `claude mcp reset-project-choices` and start Claude again.
65
+
66
+ ---
67
+
68
+ ## 3. Joiner
69
+
70
+ Accept the Tailscale invite link the host sent you.
71
+
72
+ Get Slopstream, pick one:
73
+
74
+ ```bash
75
+ # Option A: Claude Code plugin (run inside a Claude Code session, then in a terminal)
76
+ /plugin marketplace add mrlegendary25/slopstream
77
+ /plugin install slopstream@slopstream
78
+ # run /slopstream:get-started in that session (it prints the install path). Then, in a terminal:
79
+ cd <path-it-printed> && npm install && npm link
80
+ ```
81
+ ```bash
82
+ # Option B: clone it yourself (terminal only)
83
+ git clone https://github.com/mrlegendary25/slopstream.git && cd slopstream && npm install && npm link
84
+ ```
85
+
86
+ ```bash
87
+ slopstream setup ws://<host-tailscale-ip>:8787 <you> <your-token>
88
+ slopstream pair-accept <code-from-host> projX
89
+ ```
90
+
91
+ ```bash
92
+ cd ~/path/to/your/project
93
+ slopstream init projX
94
+ claude --dangerously-load-development-channels server:slopstream
95
+ ```
96
+
97
+ **Claude Code asks before it will use a project's MCP server.** On that first start, approve the prompt about this project's servers. Until you do, `slopstream` stays at `⏸ Pending approval` and `/mcp` does not list it. Check with `claude mcp list` from the project folder; if you dismissed the prompt earlier, run `claude mcp reset-project-choices` and start Claude again.
98
+
99
+ ---
100
+
101
+ **Check it worked (either side):** inside Claude, type `Use link_status.` → expect `peerOnline: true`.
102
+
103
+ **Adding a 3rd person:** host runs `slopstream invite projX` instead of `pair-create`; the new person still runs `pair-accept` as above (up to `MAX_GROUP_SIZE`, default 3).
104
+
105
+ ---
106
+
107
+ ## 4. Stop / unlink / delete
108
+
109
+ Pick what you actually need: these stack, top to bottom.
110
+
111
+ **Stop being reachable on `projX` for now, keep the link** (anyone, host or joiner):
112
+ ```bash
113
+ slopstream pause projX # undo with: slopstream resume projX
114
+ ```
115
+ Restart Claude/Codex in that folder for it to take effect.
116
+
117
+ **Leave the link entirely** (anyone, host or joiner; dissolves it for everyone once fewer than 2 chats remain):
118
+ ```bash
119
+ slopstream unlink projX
120
+ ```
121
+
122
+ **Remove Slopstream from this machine** (anyone, after unlinking everything):
123
+ ```bash
124
+ rm -rf ~/.slopstream
125
+ npm unlink -g slopstream
126
+ ```
127
+
128
+ **Host only, also stop/delete the relay:**
129
+ ```bash
130
+ # Ctrl+C in the terminal running relay/server.js, then:
131
+ rm -rf ~/.slopstream-relay
132
+ ```
133
+ Also remove the Tailscale share from <https://console.tailscale.com/admin/machines> if you no longer want that joiner reaching this machine.
134
+
135
+ ---
136
+
137
+ *Slopstream is an independent, open-source project and is not affiliated with Anthropic, OpenAI, or Tailscale Inc. See the [README](./README.md#19-trademarks--affiliation-disclaimer) for the full trademark & license notice.*
@@ -0,0 +1,196 @@
1
+ # Setup on Windows (fast path)
2
+
3
+ > Using the hosted relay? You don't need this guide: see the Quick start in README.md. This guide is for self-hosting over Tailscale.
4
+
5
+ *Part of [Slopstream](./README.md) · [Setup on macOS](./SETUP-MAC.md) · [Product overview](./product.md) · [Testing guide](./TESTING.md) · [Contributing](./CONTRIBUTING.md)*
6
+
7
+ Minimum commands to get linked, in **PowerShell**. No explanations, no optional steps; if something breaks or you want to know *why*, see [README.md](./README.md) and [TESTING.md](./TESTING.md). Requires Windows 10 1809+ or 11, Node 20+, Claude Code ≥2.1.80.
8
+
9
+ > **Tested, with a known boundary.** A **Mac host with a Windows joiner, Claude Code to Claude Code**, has been run end to end: pairing, `link_status`, and messages in both directions. Two things in this file are still *untested*: **Windows as the relay host** (Part 2), and the **PowerShell approval pop-up**, which only the Codex path uses. **Codex on Windows does not work yet** (see [Part 5](#5-windows-notes-worth-knowing)). If something here is wrong, please [open an issue](https://github.com/mrlegendary25/slopstream/issues).
10
+
11
+ One person is the **host** (runs the relay). Everyone else is a **joiner**. Do Part 1 as everyone, then Part 2 (host) or Part 3 (joiner) as your role.
12
+
13
+ **Mixed Mac and Windows is fine.** The relay and the bridge speak the same protocol on both. If the host is on a Mac, they follow [SETUP-MAC.md](./SETUP-MAC.md) Part 2 and you follow Part 3 here.
14
+
15
+ **Prefer Git Bash?** If you install [Git for Windows](https://git-scm.com/downloads/win) (recommended below anyway), every command in [SETUP-MAC.md](./SETUP-MAC.md) runs unchanged in Git Bash, including `~` and `&&`. Use that file instead of this one and skip only `caffeinate -i`. This file is for people who want to stay in PowerShell.
16
+
17
+ ---
18
+
19
+ ## 1. Everyone
20
+
21
+ - **Git for Windows**: <https://git-scm.com/downloads/win>. Recommended, not strictly required: it gives Claude Code the Bash tool (without it, Claude Code falls back to its PowerShell tool), and it gives you `git clone`.
22
+ - **Node.js 20 or newer**: <https://nodejs.org>, then check it.
23
+ ```powershell
24
+ node -v
25
+ ```
26
+ - **Claude Code**, logged in with a claude.ai account:
27
+ ```powershell
28
+ claude --version # need >= 2.1.80; if missing: irm https://claude.ai/install.ps1 | iex
29
+ ```
30
+ Open a **new** PowerShell window after installing, so `claude` is on your PATH.
31
+ - **Tailscale**: download the Windows app from <https://tailscale.com/download>, open it, sign in with your own account (not shared). Note the `100.x.x.x` address it gives you.
32
+
33
+ > If `npm` fails with *"cannot be loaded because running scripts is disabled on this system"*, PowerShell's execution policy is blocking npm's script shim. Fix it once, for your user only:
34
+ > ```powershell
35
+ > Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
36
+ > ```
37
+
38
+ ---
39
+
40
+ ## 2. Host
41
+
42
+ > Running the relay **on Windows** is the part of this file that has not been tested. The tested setup is a Mac host with a Windows joiner. If your host is on a Mac, they use [SETUP-MAC.md](./SETUP-MAC.md) Part 2 and you skip to [Part 3](#3-joiner).
43
+
44
+ Get Slopstream, pick one:
45
+
46
+ ```powershell
47
+ # Option A: Claude Code plugin (run inside a Claude Code session, then in PowerShell)
48
+ /plugin marketplace add mrlegendary25/slopstream
49
+ /plugin install slopstream@slopstream
50
+ # run /slopstream:get-started in that session (it prints the install path). Then, in PowerShell:
51
+ cd <path-it-printed>
52
+ npm install
53
+ npm link
54
+ ```
55
+ ```powershell
56
+ # Option B: clone it yourself (PowerShell only)
57
+ git clone https://github.com/mrlegendary25/slopstream.git
58
+ cd slopstream
59
+ npm install
60
+ npm link
61
+ ```
62
+
63
+ Open a **new** PowerShell window and check the CLI is on your PATH:
64
+
65
+ ```powershell
66
+ slopstream
67
+ ```
68
+ That should print the usage list. If it says the term is not recognized, npm's global folder (`$env:APPDATA\npm`) is not on your PATH; add it, or use `node bridge\cli.js <command>` from the Slopstream folder everywhere below instead of `slopstream <command>`.
69
+
70
+ Share your Tailscale machine with each joiner: <https://console.tailscale.com/admin/machines> → **⋯** on your machine → **Share** → send them the invite link.
71
+
72
+ Now create the users and start the relay, **from inside the Slopstream folder**:
73
+
74
+ ```powershell
75
+ $env:DATA_DIR = "$HOME\.slopstream-relay"
76
+ node relay/admin.js add-user <you>
77
+ node relay/admin.js add-user <joiner> # repeat per joiner
78
+ $env:HOST = "<your-tailscale-ip>"
79
+ node relay/server.js
80
+ ```
81
+ Each `add-user` prints a token. Copy them; the joiner needs theirs.
82
+
83
+ > `$env:VAR = "..."` sets the variable for **this window only**, and the relay you start in the same window inherits it. That is the PowerShell equivalent of macOS's `DATA_DIR=... node relay/server.js` prefix.
84
+ >
85
+ > **There is no `caffeinate` on Windows.** Stop the machine sleeping in **Settings → System → Power & battery → Screen and sleep** (set sleep to *Never* while you are linked), or the relay goes down and nobody can message anybody.
86
+ >
87
+ > When the relay first starts, **Windows Defender Firewall** may ask whether to allow `node` to accept incoming connections. Click **Allow** for private networks.
88
+
89
+ Leave that window running. Open a **new** PowerShell window for the rest, `cd` back into the Slopstream folder:
90
+
91
+ ```powershell
92
+ slopstream setup ws://<your-tailscale-ip>:8787 <you> <your-token>
93
+ slopstream pair-create projX
94
+ ```
95
+ Send the joiner the code it prints; type `y` when they accept.
96
+
97
+ ```powershell
98
+ cd C:\path\to\your\project
99
+ slopstream init projX
100
+ claude --dangerously-load-development-channels server:slopstream
101
+ ```
102
+
103
+ **Claude Code asks before it will use a project's MCP server.** On that first start, approve the prompt about this project's servers. Until you do, `slopstream` stays at `⏸ Pending approval` and `/mcp` does not list it. Check with `claude mcp list` from the project folder; if you dismissed the prompt earlier, run `claude mcp reset-project-choices` and start Claude again.
104
+
105
+ ---
106
+
107
+ ## 3. Joiner
108
+
109
+ Accept the Tailscale invite link the host sent you.
110
+
111
+ Get Slopstream, pick one:
112
+
113
+ ```powershell
114
+ # Option A: Claude Code plugin (run inside a Claude Code session, then in PowerShell)
115
+ /plugin marketplace add mrlegendary25/slopstream
116
+ /plugin install slopstream@slopstream
117
+ # run /slopstream:get-started in that session (it prints the install path). Then, in PowerShell:
118
+ cd <path-it-printed>
119
+ npm install
120
+ npm link
121
+ ```
122
+ ```powershell
123
+ # Option B: clone it yourself (PowerShell only)
124
+ git clone https://github.com/mrlegendary25/slopstream.git
125
+ cd slopstream
126
+ npm install
127
+ npm link
128
+ ```
129
+
130
+ Open a **new** PowerShell window (so `slopstream` is on your PATH), then:
131
+
132
+ ```powershell
133
+ slopstream setup ws://<host-tailscale-ip>:8787 <you> <your-token>
134
+ slopstream pair-accept <code-from-host> projX
135
+ ```
136
+
137
+ ```powershell
138
+ cd C:\path\to\your\project
139
+ slopstream init projX
140
+ claude --dangerously-load-development-channels server:slopstream
141
+ ```
142
+
143
+ **Claude Code asks before it will use a project's MCP server.** On that first start, approve the prompt about this project's servers. Until you do, `slopstream` stays at `⏸ Pending approval` and `/mcp` does not list it. Check with `claude mcp list` from the project folder; if you dismissed the prompt earlier, run `claude mcp reset-project-choices` and start Claude again.
144
+
145
+ A joiner never runs the relay, so nothing in this part is Windows-specific beyond `cd` taking a `C:\` path.
146
+
147
+ ---
148
+
149
+ **Check it worked (either side):** inside Claude, type `Use link_status.` → expect `peerOnline: true`.
150
+
151
+ **Adding a 3rd person:** host runs `slopstream invite projX` instead of `pair-create`; the new person still runs `pair-accept` as above (up to `MAX_GROUP_SIZE`, default 3).
152
+
153
+ ---
154
+
155
+ ## 4. Stop / unlink / delete
156
+
157
+ Pick what you actually need: these stack, top to bottom.
158
+
159
+ **Stop being reachable on `projX` for now, keep the link** (anyone, host or joiner):
160
+ ```powershell
161
+ slopstream pause projX # undo with: slopstream resume projX
162
+ ```
163
+ Restart Claude in that folder for it to take effect.
164
+
165
+ **Leave the link entirely** (anyone, host or joiner; dissolves it for everyone once fewer than 2 chats remain):
166
+ ```powershell
167
+ slopstream unlink projX
168
+ ```
169
+
170
+ **Remove Slopstream from this machine** (anyone, after unlinking everything):
171
+ ```powershell
172
+ Remove-Item -Path "$HOME\.slopstream" -Recurse -Force
173
+ npm unlink -g slopstream
174
+ ```
175
+
176
+ **Host only, also stop/delete the relay:**
177
+ ```powershell
178
+ # Ctrl+C in the window running relay/server.js, then:
179
+ Remove-Item -Path "$HOME\.slopstream-relay" -Recurse -Force
180
+ ```
181
+ Also remove the Tailscale share from <https://console.tailscale.com/admin/machines> if you no longer want that joiner reaching this machine.
182
+
183
+ ---
184
+
185
+ ## 5. Windows notes worth knowing
186
+
187
+ - **`&&` is not a statement separator in PowerShell 5.1** (the one that ships with Windows). That is why every command above is on its own line. PowerShell 7 supports `&&`.
188
+ - **`~` is `$HOME`** in PowerShell. `$HOME` is used throughout this file so you can paste lines as they are.
189
+ - **Stopping the relay.** `slopstream` finds a running relay through a pidfile the relay writes on start (`$env:DATA_DIR\relay.pid` and `$HOME\.slopstream-relay.pid`), not by scanning process names. If you started the relay some other way and `slopstream` cannot see it, just close its window. *Not yet tested on Windows,* since the tested setup hosts the relay on a Mac.
190
+ - **Approval pop-ups.** The `native` gate, which Codex uses and Claude Code does not, is a PowerShell message box with **Yes** / **No** buttons rather than named buttons, so the action is spelled out in the message text. Set `SLOPSTREAM_PWSH=pwsh.exe` to use PowerShell 7 for it. *Not yet tested,* because Claude Code to Claude Code never reaches it.
191
+ - **Your token file is not locked down.** `$HOME\.slopstream\config.json` is written owner-only on macOS. Windows ignores that mode flag, so the file gets your user profile's default permissions. Fine on a single-user machine; tighten it yourself on a shared one.
192
+ - **Codex on Windows does not work yet.** `slopstream init projX --agent codex` writes a `SessionStart` hook command into `.codex\config.toml` using POSIX single-quoting, which `cmd.exe` does not understand. Claude Code to Claude Code is unaffected. Tracked as a known gap.
193
+
194
+ ---
195
+
196
+ *Slopstream is an independent, open-source project and is not affiliated with Anthropic, OpenAI, or Tailscale Inc. See the [README](./README.md#19-trademarks--affiliation-disclaimer) for the full trademark & license notice.*