clay-server 2.19.0-beta.1 → 2.19.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/README.md +55 -92
- package/lib/config.js +1 -0
- package/lib/server.js +7 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,137 +1,109 @@
|
|
|
1
1
|
# Clay
|
|
2
2
|
|
|
3
|
-
<
|
|
4
|
-
<img src="media/phone.gif" alt="Clay on phone" width="300">
|
|
5
|
-
</p>
|
|
6
|
-
|
|
7
|
-
<h3 align="center">Turn Claude Code into a team workspace. Any device, one command.</h3>
|
|
3
|
+
<h3 align="center">Claude Code in your browser. Bring your team, or build one.</h3>
|
|
8
4
|
|
|
9
5
|
[](https://www.npmjs.com/package/clay-server) [](https://www.npmjs.com/package/clay-server) [](https://github.com/chadbyte/clay) [](https://github.com/chadbyte/clay/blob/main/LICENSE)
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Getting Started
|
|
16
|
-
|
|
17
|
-
**Requirements:** Node.js 20+, Claude Code CLI (authenticated).
|
|
7
|
+
Everything Claude Code does, Clay does in your browser. Plus multi-session, file browser, scheduled agents, mobile notifications, and more. Invite your team to work together in the same session, or build an AI team from scratch. **Your machine is the server.** No cloud relay, no middleman.
|
|
18
8
|
|
|
19
9
|
```bash
|
|
20
10
|
npx clay-server
|
|
11
|
+
# Scan the QR code to connect from any device
|
|
21
12
|
```
|
|
22
13
|
|
|
23
|
-
On first run, it walks you through port and PIN setup.
|
|
24
|
-
Scan the QR code to connect from your phone instantly.
|
|
25
|
-
|
|
26
|
-
For remote access, use a VPN like Tailscale.
|
|
27
|
-
|
|
28
|
-
<p align="center">
|
|
29
|
-
<img src="media/start.gif" alt="Clay starting from CLI" width="600">
|
|
30
|
-
</p>
|
|
31
|
-
|
|
32
14
|
---
|
|
33
15
|
|
|
34
|
-
##
|
|
16
|
+
## What you get
|
|
35
17
|
|
|
36
|
-
|
|
37
|
-
Run backend, frontend, and docs simultaneously. Switch between them in the sidebar.
|
|
18
|
+
### Everything the CLI does
|
|
38
19
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
Mermaid diagrams render as diagrams. Tables render as tables.
|
|
42
|
-
Code blocks highlight 180+ languages.
|
|
43
|
-
Browse project files in the file browser — changes reflect live while the agent works.
|
|
20
|
+
Your CLI sessions, your CLAUDE.md rules, your MCP servers. **All of it works in Clay as-is.** Pick up a CLI session in the browser, or continue a browser session in the CLI. Same SDK, same tools, same results.
|
|
44
21
|
|
|
45
22
|
<p align="center">
|
|
46
23
|
<img src="media/split.gif" alt="split-screen workflow" width="700">
|
|
47
24
|
</p>
|
|
48
25
|
|
|
49
|
-
|
|
26
|
+
### Everything the CLI doesn't
|
|
50
27
|
|
|
51
|
-
|
|
28
|
+
**Multiple agents, multiple projects, at the same time.** Switch between them in the sidebar. Browse project files live while the agent works, with syntax highlighting for 180+ languages. Mermaid diagrams render as diagrams. Tables render as tables.
|
|
52
29
|
|
|
53
|
-
|
|
30
|
+
**Schedule agents with cron**, or let them run autonomously with **Ralph Loop**. Your phone buzzes when Claude needs approval, finishes a task, or hits an error. Install as a **PWA for push notifications**. Close your laptop, sessions keep running.
|
|
54
31
|
|
|
55
|
-
|
|
32
|
+
<p align="center">
|
|
33
|
+
<img src="media/phone.gif" alt="Clay on phone" width="280">
|
|
34
|
+
</p>
|
|
56
35
|
|
|
57
|
-
|
|
36
|
+
### Bring your whole team
|
|
58
37
|
|
|
59
|
-
|
|
38
|
+
**One API key runs the whole workspace.** Invite teammates, set permissions per person, per project, per session. A designer reports a bug in plain language. A junior dev works with guardrails. If someone gets stuck, **jump into their session** to help in real time.
|
|
60
39
|
|
|
61
|
-
|
|
40
|
+
Add a CLAUDE.md and the AI operates within those rules: explains technical terms simply, escalates risky operations to seniors, summarizes changes in plain words. Real-time presence shows who's where.
|
|
62
41
|
|
|
63
|
-
Build your team
|
|
42
|
+
### Build your team with Mates
|
|
64
43
|
|
|
65
|
-
Mates are AI teammates
|
|
44
|
+
Not *"act like a design expert."* Mates are AI teammates shaped through real conversation, trained with your context, and built to hold their own perspective. Give them a name, avatar, expertise, and working style. **They don't flatter you. They push back.**
|
|
66
45
|
|
|
67
|
-
They
|
|
46
|
+
They live in your sidebar next to your human teammates. @mention them in any project session when you need their take, DM them directly, or bring multiple into the same conversation. Each Mate builds persistent knowledge over time, remembering past decisions, project context, and how you work together.
|
|
68
47
|
|
|
69
|
-
|
|
48
|
+
#### Debate before you decide
|
|
70
49
|
|
|
71
|
-
|
|
50
|
+
Let your Mates challenge each other. Set up a debate. Pick a moderator and panelists, give them a topic, and let them go. You can raise your hand to interject. When it wraps up, you get opposing perspectives from every angle.
|
|
72
51
|
|
|
73
|
-
|
|
52
|
+
"Should we rewrite this in Rust?" "Should we delay the launch to fix onboarding?" "Should we position this as enterprise-first or PLG?" Get real opposing perspectives before you commit.
|
|
74
53
|
|
|
75
|
-
|
|
76
|
-
Pick up a terminal session in the browser. Continue a browser session from another device.
|
|
77
|
-
One QR code to connect. Install as a PWA for a native-like experience.
|
|
54
|
+
### Your machine, your server
|
|
78
55
|
|
|
79
|
-
|
|
56
|
+
Clay runs as a daemon on your machine. **No cloud relay, no intermediary service** between your browser and your code. Data flows directly to the Anthropic API, exactly as it does from the CLI.
|
|
80
57
|
|
|
81
|
-
|
|
82
|
-
<img src="media/push-notification.jpg" alt="push notification" width="300">
|
|
83
|
-
</p>
|
|
58
|
+
PIN authentication, per-project permissions, and HTTPS are built in. For remote access, use a VPN like Tailscale.
|
|
84
59
|
|
|
85
60
|
---
|
|
86
61
|
|
|
87
|
-
##
|
|
62
|
+
## How a bug gets fixed
|
|
88
63
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
64
|
+
**Without Clay:**
|
|
65
|
+
Designer finds a bug → writes up a ticket on Asana → dev asks clarifying questions → PM prioritizes → dev opens terminal, fixes it → shares a preview → QA checks → deploy
|
|
66
|
+
<br>*7 steps. 3 people. 2 days.*
|
|
92
67
|
|
|
93
|
-
|
|
68
|
+
**With Clay:**
|
|
69
|
+
Designer opens Clay in the browser, describes the bug in plain language → senior joins the same session, reviews the fix together → merge
|
|
70
|
+
<br>*2 steps. 2 people. Minutes. The designer never touched a terminal.*
|
|
94
71
|
|
|
95
72
|
---
|
|
96
73
|
|
|
97
|
-
##
|
|
74
|
+
## How Clay compares
|
|
98
75
|
|
|
99
|
-
|
|
76
|
+
*As of March 2026.*
|
|
100
77
|
|
|
101
|
-
|
|
78
|
+
| | CLI | Remote Control | Channels | **Clay** |
|
|
79
|
+
|---|---|---|---|---|
|
|
80
|
+
| Multi-user with roles | – | – | Platform-dependent | **Accounts + RBAC** |
|
|
81
|
+
| AI teammates (Mates + Debates) | – | – | – | **Yes** |
|
|
82
|
+
| Join teammate's session | – | – | – | **Yes** |
|
|
83
|
+
| Persistent daemon | – | Session-based | – | **Yes** |
|
|
84
|
+
| Native mobile app | – | **Yes** | **Platform app** | PWA |
|
|
85
|
+
| Official support | **Anthropic** | **Anthropic** | **Anthropic** | Community |
|
|
102
86
|
|
|
103
|
-
|
|
87
|
+
Clay is a community project, not affiliated with Anthropic. Official tools receive guaranteed support and updates.
|
|
104
88
|
|
|
105
|
-
|
|
89
|
+
---
|
|
106
90
|
|
|
107
|
-
|
|
91
|
+
## Getting Started
|
|
108
92
|
|
|
109
|
-
|
|
110
|
-
|---|---|---|---|---|---|
|
|
111
|
-
| Multi-user | ❌ | ✅ | ❌ | ❌ | ✅ |
|
|
112
|
-
| Mobile / PWA | ✅ | ➖ | ➖ | ➖ | ✅ |
|
|
113
|
-
| Push notifications | 🟠 | ❌ | 🟠 | ❌ | ✅ |
|
|
114
|
-
| GUI | 🟠 | ❌ | ✅ | ✅ | ✅ |
|
|
115
|
-
| Scheduler (cron) | 🟠 | ❌ | ✅ | ✅ | ✅ |
|
|
116
|
-
| Scheduler survives logout | ❌ | ➖ | 🟠 | 🟠 | ✅ |
|
|
117
|
-
| Join teammate's session | ❌ | 🟠 | ❌ | ❌ | ✅ |
|
|
93
|
+
**Requirements:** Node.js 20+, Claude Code CLI (authenticated).
|
|
118
94
|
|
|
119
|
-
|
|
95
|
+
```bash
|
|
96
|
+
npx clay-server
|
|
97
|
+
```
|
|
120
98
|
|
|
121
|
-
|
|
99
|
+
On first run, it walks you through port and PIN setup.
|
|
100
|
+
Scan the QR code to connect from your phone instantly.
|
|
122
101
|
|
|
123
|
-
|
|
102
|
+
For remote access, use a VPN like Tailscale.
|
|
124
103
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
* **Push notifications** - Approval, completion, error. Native-like PWA experience.
|
|
129
|
-
* **Scheduler** - Cron-based automatic agent execution.
|
|
130
|
-
* **Ralph Loop** - Autonomous coding loop. The agent works, a judge evaluates, and it iterates until it passes.
|
|
131
|
-
* **File browser** - File exploration, syntax highlighting, live reload.
|
|
132
|
-
* **Built-in terminal** - Multi-tab terminal, mobile keyboard support.
|
|
133
|
-
* **Session search** - Full-text search across all conversation history.
|
|
134
|
-
* **Session persistence** - Survives crashes, restarts, and network drops.
|
|
104
|
+
<p align="center">
|
|
105
|
+
<img src="media/start.gif" alt="Clay starting from CLI" width="600">
|
|
106
|
+
</p>
|
|
135
107
|
|
|
136
108
|
---
|
|
137
109
|
|
|
@@ -150,20 +122,11 @@ Yes. Pick up a CLI session in the browser, or continue a browser session in the
|
|
|
150
122
|
Yes. If your project has a CLAUDE.md, it works in Clay as-is.
|
|
151
123
|
|
|
152
124
|
**"Does each teammate need their own API key?"**
|
|
153
|
-
No. Teammates share the Claude Code session logged in on the server.
|
|
125
|
+
No. Teammates share the Claude Code session logged in on the server. You can also assign different API keys per project for billing isolation.
|
|
154
126
|
|
|
155
127
|
**"Does it work with MCP servers?"**
|
|
156
128
|
Yes. MCP configurations from the CLI carry over as-is.
|
|
157
129
|
|
|
158
|
-
**"What are Mates?"**
|
|
159
|
-
AI teammates you create through a conversation. Each Mate has a name, avatar, personality, and persistent memory. They live in your sidebar and you can DM them or bring them into projects.
|
|
160
|
-
|
|
161
|
-
**"How is a Mate different from Claude Projects?"**
|
|
162
|
-
Claude Projects save prompts and files as context. A Mate is a teammate. It has its own identity formed through an interview, remembers how you work together across sessions, and exists alongside your human teammates in the workspace. You're not organizing prompts. You're building a team.
|
|
163
|
-
|
|
164
|
-
**"Can I create multiple Mates?"**
|
|
165
|
-
Yes. Create as many as you need. A code reviewer, a writing partner, a project manager. Each one is independent.
|
|
166
|
-
|
|
167
130
|
---
|
|
168
131
|
|
|
169
132
|
## HTTPS
|
package/lib/config.js
CHANGED
package/lib/server.js
CHANGED
|
@@ -222,7 +222,9 @@ function isAuthed(req, authToken) {
|
|
|
222
222
|
|
|
223
223
|
// --- Multi-user auth helpers ---
|
|
224
224
|
// Multi-user auth tokens: persisted to disk so they survive restarts
|
|
225
|
-
var
|
|
225
|
+
var _isDevMode = require("./config").isDevMode;
|
|
226
|
+
var TOKENS_FILE = path.join(CONFIG_DIR, _isDevMode ? "auth-tokens-dev.json" : "auth-tokens.json");
|
|
227
|
+
var MULTI_USER_COOKIE = _isDevMode ? "relay_auth_user_dev" : "relay_auth_user";
|
|
226
228
|
var multiUserTokens = {}; // token → userId
|
|
227
229
|
|
|
228
230
|
function loadTokens() {
|
|
@@ -252,13 +254,13 @@ function createMultiUserSession(userId, tlsOptions) {
|
|
|
252
254
|
var token = users.generateUserAuthToken(userId);
|
|
253
255
|
multiUserTokens[token] = userId;
|
|
254
256
|
saveTokens();
|
|
255
|
-
var cookie = "
|
|
257
|
+
var cookie = MULTI_USER_COOKIE + "=" + token + "; Path=/; HttpOnly; SameSite=Strict; Max-Age=31536000" + (tlsOptions ? "; Secure" : "");
|
|
256
258
|
return { token: token, cookie: cookie };
|
|
257
259
|
}
|
|
258
260
|
|
|
259
261
|
function getMultiUserFromReq(req) {
|
|
260
262
|
var cookies = parseCookies(req);
|
|
261
|
-
var token = cookies[
|
|
263
|
+
var token = cookies[MULTI_USER_COOKIE];
|
|
262
264
|
if (!token) return null;
|
|
263
265
|
var userId = multiUserTokens[token];
|
|
264
266
|
if (!userId) return null;
|
|
@@ -962,13 +964,13 @@ function createServer(opts) {
|
|
|
962
964
|
if (req.method === "POST" && fullUrl === "/auth/logout") {
|
|
963
965
|
if (users.isMultiUser()) {
|
|
964
966
|
var cookies = parseCookies(req);
|
|
965
|
-
var token = cookies[
|
|
967
|
+
var token = cookies[MULTI_USER_COOKIE];
|
|
966
968
|
if (token && multiUserTokens[token]) {
|
|
967
969
|
delete multiUserTokens[token];
|
|
968
970
|
saveTokens();
|
|
969
971
|
}
|
|
970
972
|
res.writeHead(200, {
|
|
971
|
-
"Set-Cookie": "
|
|
973
|
+
"Set-Cookie": MULTI_USER_COOKIE + "=; Path=/; HttpOnly; SameSite=Strict; Max-Age=0" + (tlsOptions ? "; Secure" : ""),
|
|
972
974
|
"Content-Type": "application/json",
|
|
973
975
|
});
|
|
974
976
|
} else {
|