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 CHANGED
@@ -1,137 +1,109 @@
1
1
  # Clay
2
2
 
3
- <p align="center">
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
  [![npm version](https://img.shields.io/npm/v/clay-server)](https://www.npmjs.com/package/clay-server) [![npm downloads](https://img.shields.io/npm/dw/clay-server)](https://www.npmjs.com/package/clay-server) [![GitHub stars](https://img.shields.io/github/stars/chadbyte/clay)](https://github.com/chadbyte/clay) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/chadbyte/clay/blob/main/LICENSE)
10
6
 
11
- Clay gives Claude Code a browser UI that runs on any device. Use it from your phone, run it on macOS, Windows, or Linux. Invite teammates, manage multiple projects from one sidebar, and get push notifications when Claude needs you. HTTPS and push notifications work out of the box with zero config. Built on the official Claude Agent SDK, not a terminal parser. Your machine is the server. No cloud relay in between, no extra network surface.
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
- ## Multi-session, multi-project
16
+ ## What you get
35
17
 
36
- Add a project in the browser and an agent attaches to it.
37
- Run backend, frontend, and docs simultaneously. Switch between them in the sidebar.
18
+ ### Everything the CLI does
38
19
 
39
- The server runs as a background daemon. Sessions persist even after you close the terminal.
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
- ## Multi-user
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
- Invite teammates and give them access to a project. They talk to Claude Code directly in the browser no terminal, no setup on their end.
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
- Add a CLAUDE.md and the AI operates within those rules: explains technical terms in plain language, escalates risky operations to seniors, summarizes changes in simple words.
32
+ <p align="center">
33
+ <img src="media/phone.gif" alt="Clay on phone" width="280">
34
+ </p>
56
35
 
57
- If someone gets stuck, join their session to unblock them in real time. Permissions can be separated per project and per session. Real-time presence shows who's where.
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
- ## Mates
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, even if you're solo.
42
+ ### Build your team with Mates
64
43
 
65
- Mates are AI teammates you create through conversation. Interview them, give them a name, avatar, and role. A code reviewer, a marketing lead, a writing partner. They remember how you work together and carry context across sessions.
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 sit in your sidebar next to your human teammates. DM them, bring them into projects, let them work autonomously. In a multi-user workspace, your whole team, human and AI, works in one place.
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
- <!-- screenshot: sidebar with Mates visible -->
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
- ## Mobile & notifications
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
- Phone, tablet, couch. All you need is a browser.
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
- When Claude asks for approval, your phone buzzes. You also get notified on completion or error. No need to keep the browser open.
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
- <p align="center">
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
- ## Automation
62
+ ## How a bug gets fixed
88
63
 
89
- The scheduler kicks off agents at set times.
90
- Have it check open issues and submit PRs every morning at 8 AM.
91
- Or compile world news and email you a digest every day.
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
- Take it further with Ralph Loop, an autonomous coding loop built into Clay. The agent works, commits, and a judge evaluates. If it fails, a fresh session starts over with no memory of the previous attempt. Only the code carries over. Based on [Geoffrey Huntley's Ralph Wiggum technique](https://ghuntley.com/loop/).
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
- ## Security & Privacy
74
+ ## How Clay compares
98
75
 
99
- Your data flows directly from your machine to the Anthropic API, exactly as it does when you use the CLI. Clay adds a browser layer on top, not a middleman.
76
+ *As of March 2026.*
100
77
 
101
- HTTPS is enabled by default with a builtin certificate. PIN authentication and per-project/session permissions are built in. For local network use, this is sufficient. For remote access, we recommend a VPN like Tailscale.
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
- ## Why Clay?
89
+ ---
106
90
 
107
- *As of March 2026.*
91
+ ## Getting Started
108
92
 
109
- | | CLI + Remote Control | tmux | Desktop | Cowork | **Clay** |
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
- ✅ Supported · 🟠 Partial / limited · ❌ Not supported · ➖ N/A
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
- ## Key Features
102
+ For remote access, use a VPN like Tailscale.
124
103
 
125
- * **Mates** - AI teammates with persistent identity, context, and memory. Create through an interview, DM them, collaborate across sessions.
126
- * **Multi-user** - Accounts, invitations, per-project/session permissions, real-time presence.
127
- * **Multi-agent** - Parallel agents per project, sidebar switching.
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. If needed, you can configure per-project environment variables to use different API keys.
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
@@ -335,4 +335,5 @@ module.exports = {
335
335
  syncClayrc: syncClayrc,
336
336
  removeFromClayrc: removeFromClayrc,
337
337
  chmodSafe: chmodSafe,
338
+ isDevMode: _devMode,
338
339
  };
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 TOKENS_FILE = path.join(CONFIG_DIR, "auth-tokens.json");
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 = "relay_auth_user=" + token + "; Path=/; HttpOnly; SameSite=Strict; Max-Age=31536000" + (tlsOptions ? "; Secure" : "");
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["relay_auth_user"];
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["relay_auth_user"];
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": "relay_auth_user=; Path=/; HttpOnly; SameSite=Strict; Max-Age=0" + (tlsOptions ? "; Secure" : ""),
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clay-server",
3
- "version": "2.19.0-beta.1",
3
+ "version": "2.19.0",
4
4
  "description": "Web UI for Claude Code. Any device. Push notifications.",
5
5
  "bin": {
6
6
  "clay-server": "./bin/cli.js",