claude-relay 2.35.1 → 2.36.0-beta.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.
- package/README.md +136 -88
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,173 +1,221 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="media/logo/icon-full-banded-256-transparent.png" alt="Clay" />
|
|
2
|
+
<img src="media/logo/icon-full-banded-256-transparent.png" alt="Clay - self-hosted team workspace for Claude Code and Codex" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
<
|
|
5
|
+
<h2 align="center">Multiplayer Claude Code and Codex.</h2>
|
|
6
|
+
<h4 align="center">
|
|
7
|
+
Drop into a teammate's session live.<br>
|
|
8
|
+
Or pair with AI mates that remember and push back.<br>
|
|
9
|
+
Self-hosted, one toggle between vendors.
|
|
10
|
+
</h4>
|
|
6
11
|
|
|
7
|
-
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://www.npmjs.com/package/clay-server"><img src="https://img.shields.io/npm/v/clay-server" alt="npm version" /></a>
|
|
14
|
+
<a href="https://www.npmjs.com/package/clay-server"><img src="https://img.shields.io/npm/dw/clay-server" alt="npm downloads" /></a>
|
|
15
|
+
<a href="https://github.com/chadbyte/clay"><img src="https://img.shields.io/github/stars/chadbyte/clay" alt="GitHub stars" /></a>
|
|
16
|
+
<a href="https://github.com/chadbyte/clay/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
The browser tab your whole team lives in. Humans, AI agents, projects, sessions, decisions.
|
|
8
20
|
|
|
9
|
-
|
|
21
|
+
Afraid of locking your personal or team knowledge into one vendor? With Clay, your conventions, sessions, and decisions live on your disk. Switch when you want.
|
|
10
22
|
|
|
11
|
-
|
|
23
|
+
*A team-shared, self-hosted GUI for Claude Code and Codex CLIs.*
|
|
12
24
|
|
|
13
25
|
```bash
|
|
14
26
|
npx clay-server
|
|
15
27
|
# Scan the QR code to connect from any device
|
|
16
28
|
```
|
|
17
29
|
|
|
18
|
-
|
|
30
|
+
## What's Clay?
|
|
19
31
|
|
|
20
|
-
|
|
32
|
+
- **A browser-based workspace for Claude Code and Codex.** Open it on any device, alone or with your whole team.
|
|
33
|
+
- **A place where your team collaborates across projects.** Engineers, PMs, designers, and domain experts share one workspace, hop between projects, drop into each other's sessions.
|
|
34
|
+
- **Your virtual team.** Mates with names, memory, and roles — architect, reviewer, designer, whoever you need. They learn your codebase, push back on bad ideas, and don't reset between sessions.
|
|
35
|
+
- **A multi-project dashboard.** Every repo on your machine in one sidebar. Run agents across several in parallel; permission requests and completions surface as notifications.
|
|
36
|
+
- **A self-hosted dev server.** Runs on your machine in plain JSONL and Markdown. No proprietary database, no cloud relay, no lock-in. Walk away whenever — your data walks with you.
|
|
37
|
+
- **A work-automation system.** Ralph Loop iterates a feature overnight; cron schedules agents while you're away. Wake up to results, or a clean failure trace.
|
|
21
38
|
|
|
22
|
-
|
|
39
|
+
## What it does
|
|
23
40
|
|
|
24
|
-
|
|
41
|
+
### Run Claude Code and Codex in one workspace
|
|
42
|
+
|
|
43
|
+
Open a session, pick a vendor. Switch sessions, pick the other. Clay's adapter layer (YOKE) speaks the Claude Agent SDK and the Codex app-server protocol natively. Cross-vendor instruction loading: Codex reads AGENTS.md, Claude reads CLAUDE.md, Clay merges the rest into the system prompt automatically.
|
|
25
44
|
|
|
26
45
|
<p align="center">
|
|
27
|
-
<img src="media/split.gif" alt="
|
|
46
|
+
<img src="media/split.gif" alt="Toggle between Claude Code and Codex in one click" width="700">
|
|
28
47
|
</p>
|
|
29
48
|
|
|
30
|
-
###
|
|
49
|
+
### Every project on one dashboard
|
|
31
50
|
|
|
32
|
-
|
|
51
|
+
All your projects live in the sidebar. Jump between them in one click, see live status across each, run agents in several at once. No more `cd ~/work/foo && tmux attach && ...`. One Clay daemon hosts every repo on your machine and gives you a single pane of glass over all of them.
|
|
33
52
|
|
|
34
|
-
|
|
53
|
+
### Mates: AI teammates with persistent memory
|
|
35
54
|
|
|
36
|
-
|
|
55
|
+
Mates are AI personas with their own CLAUDE.md, knowledge files, and memory that compounds across sessions. They learn your stack, your conventions, your decision history. @mention them mid-session, DM them directly, or drop them into a debate. **They don't flatter you. They push back.**
|
|
37
56
|
|
|
38
57
|
<p align="center">
|
|
39
|
-
<img src="media/
|
|
58
|
+
<img src="media/mates.gif" alt="An AI teammate (Mate) pushing back on a bad design pitch in Clay" width="640">
|
|
40
59
|
</p>
|
|
41
60
|
|
|
42
|
-
###
|
|
61
|
+
### Debate: structured multi-Mate decisions
|
|
43
62
|
|
|
44
|
-
|
|
63
|
+
Stuck on REST vs GraphQL? Monorepo or split? Surface the question to a debate. Pick panelists, set the format, let your Mates argue both sides with moderated turns. You walk away with a recorded decision, not a vibe check.
|
|
45
64
|
|
|
46
|
-
|
|
65
|
+
### Parallel worktrees
|
|
47
66
|
|
|
48
|
-
|
|
67
|
+
Detect existing git worktrees, spin up new ones from the sidebar, and run agents in each one independently. No more "wait, I have uncommitted changes." Each worktree is an isolated session with its own history.
|
|
49
68
|
|
|
50
|
-
###
|
|
69
|
+
### Ralph Loop: autonomous coding while you sleep
|
|
51
70
|
|
|
52
|
-
|
|
71
|
+
Write a `PROMPT.md`, optionally a `JUDGE.md`, hit go. Clay iterates: code, evaluate, retry, until the judge approves or you cap the loop. Run it once, or schedule it on standard Unix cron. Wake up to a finished feature or a clean failure trace.
|
|
53
72
|
|
|
54
|
-
|
|
73
|
+
### Web UI, mobile, push notifications
|
|
55
74
|
|
|
56
|
-
|
|
75
|
+
Installable PWA on iOS and Android. Push notifications for approvals, errors, and completed tasks. Service worker keeps the app responsive offline. When Claude needs approval, your phone buzzes, you tap approve, the agent keeps going.
|
|
57
76
|
|
|
58
|
-
|
|
77
|
+
## Who is Clay for
|
|
59
78
|
|
|
60
|
-
|
|
79
|
+
### Small teams (3–10)
|
|
61
80
|
|
|
62
|
-
|
|
81
|
+
Engineers, PMs, designers, and domain experts in one workspace. Non-devs read the codebase and ask questions without ever opening an editor. Engineers @mention each other or drop into a teammate's session to help in real time. Share one org-wide API key or let each member bring their own, with costs routing to whoever ran the model.
|
|
63
82
|
|
|
64
|
-
|
|
83
|
+
### Larger teams (10+)
|
|
65
84
|
|
|
66
|
-
|
|
85
|
+
Per-user, per-project, per-session permissions. On Linux, opt in to OS-level isolation: each Clay user maps to a real Linux account, file ACLs enforced via `setfacl`, processes spawn under the right UID/GID. Per-project API keys for billing separation. Plain JSONL sessions give you an audit trail you can grep.
|
|
67
86
|
|
|
68
|
-
|
|
87
|
+
### Solopreneurs and indie developers
|
|
69
88
|
|
|
70
|
-
|
|
89
|
+
You don't have a team yet, so Mates are your team. A persistent architect, a reviewer, a designer — each with their own memory, ready to push back on bad ideas. Run Ralph Loop overnight to ship while you sleep. Toggle Claude and Codex per session to balance cost and capability.
|
|
71
90
|
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
|
|
91
|
+
### Self-hosting developers
|
|
92
|
+
|
|
93
|
+
Your code stays on your machine. Sessions are JSONL, knowledge is Markdown, settings are JSON. No proprietary database, no cloud relay, no middleman. CLAUDE.md, AGENTS.md, `.cursorrules` are all loaded automatically across vendors. Walk away whenever, your data walks with you.
|
|
75
94
|
|
|
76
95
|
## Getting Started
|
|
77
96
|
|
|
78
|
-
**Requirements:** Node.js 20
|
|
97
|
+
**Requirements:** Node.js 20+. Authenticated Claude Code CLI, Codex CLI, or both.
|
|
79
98
|
|
|
80
99
|
```bash
|
|
81
100
|
npx clay-server
|
|
82
101
|
```
|
|
83
102
|
|
|
84
|
-
On first run,
|
|
85
|
-
Open the browser URL or scan the QR code to connect from your phone instantly.
|
|
103
|
+
On first run, Clay asks for a port and whether you're solo or with a team. Open the URL or scan the QR code from your phone.
|
|
86
104
|
|
|
87
105
|
For remote access, use a VPN like Tailscale.
|
|
88
106
|
|
|
89
107
|
<p align="center">
|
|
90
|
-
<img src="media/start.gif" alt="Clay
|
|
108
|
+
<img src="media/start.gif" alt="Starting Clay daemon from the CLI with npx clay-server" width="600">
|
|
91
109
|
</p>
|
|
92
110
|
|
|
111
|
+
## CLI Options
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npx clay-server # Default (port 2633)
|
|
115
|
+
npx clay-server -p 8080 # Specify port
|
|
116
|
+
npx clay-server --yes # Skip interactive prompts (use defaults)
|
|
117
|
+
npx clay-server -y --pin 123456
|
|
118
|
+
# Non-interactive + PIN (for scripts/CI)
|
|
119
|
+
npx clay-server --add . # Add current directory to running daemon
|
|
120
|
+
npx clay-server --remove . # Remove project
|
|
121
|
+
npx clay-server --list # List registered projects
|
|
122
|
+
npx clay-server --shutdown # Stop running daemon
|
|
123
|
+
npx clay-server --dangerously-skip-permissions
|
|
124
|
+
# Bypass all permission prompts (requires PIN at setup)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Run `npx clay-server --help` for all options.
|
|
128
|
+
|
|
93
129
|
## FAQ
|
|
94
130
|
|
|
95
|
-
**"Is this
|
|
96
|
-
Clay
|
|
131
|
+
**"Is this a Claude Code wrapper?"**
|
|
132
|
+
No. Clay drives Claude Code through the [Claude Agent SDK](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk) and Codex through the Codex app-server protocol. Both are first-class. Clay adds multi-session orchestration, persistent Mates, structured debates, scheduled agents, multi-user collaboration, built-in MCP servers, and a full browser UI on top.
|
|
133
|
+
|
|
134
|
+
**"Can I run Claude Code and Codex in the same workspace?"**
|
|
135
|
+
Yes. Pick a vendor when you open a session. Switch per session. Same projects, same Mates, same memory.
|
|
136
|
+
|
|
137
|
+
**"How are Mates different from Claude Code's sub-agents?"**
|
|
138
|
+
Sub-agents are ephemeral specialists spawned inside a single Claude Code session — a role and a system prompt for one task, then forgotten when the task ends. Mates are persistent teammates with their own knowledge files and memory that survive every session. A sub-agent forgets you the moment it returns; a Mate remembers your codebase, your decisions, and your conventions across months of work. @mention a Mate mid-session, DM it between sessions, or drop several into a debate.
|
|
97
139
|
|
|
98
140
|
**"Does my code leave my machine?"**
|
|
99
|
-
|
|
141
|
+
Only as model API calls (the same as using the CLI directly). Sessions, Mates, knowledge, and settings all stay on disk.
|
|
100
142
|
|
|
101
|
-
**"
|
|
102
|
-
Yes.
|
|
143
|
+
**"Does my existing CLAUDE.md / AGENTS.md / .cursorrules work?"**
|
|
144
|
+
Yes. Clay loads native instruction files for each vendor and merges the rest into the system prompt automatically.
|
|
103
145
|
|
|
104
|
-
**"
|
|
105
|
-
Yes.
|
|
146
|
+
**"Can I continue a CLI session in the browser?"**
|
|
147
|
+
Yes. CLI sessions show up in the sidebar. Browser sessions can be picked up in the CLI.
|
|
106
148
|
|
|
107
149
|
**"Does each teammate need their own API key?"**
|
|
108
|
-
No.
|
|
150
|
+
No. Share one org-wide key, or let each user bring their own. On Linux with OS-level isolation, each member can also use their own Claude Code or Codex login.
|
|
151
|
+
|
|
152
|
+
**"What does OS-level isolation actually do?"**
|
|
153
|
+
On Linux, opt in and Clay provisions each user as a real Linux account. File ACLs are enforced via `setfacl`, agent processes spawn under the user's UID/GID, and the kernel handles the rest. One teammate can't read another's project files, even by accident. The guarantee comes from the OS, not from a promise in our code.
|
|
109
154
|
|
|
110
155
|
**"Does it work with MCP servers?"**
|
|
111
|
-
Yes.
|
|
156
|
+
Yes. User-configured MCPs from `~/.clay/mcp.json` plus built-in browser, email, ask-user, and debate servers. All work in both Claude and Codex sessions.
|
|
112
157
|
|
|
113
158
|
**"Can I use it on my phone?"**
|
|
114
|
-
Yes.
|
|
159
|
+
Yes. Install as a PWA on iOS or Android. Push notifications for approvals, errors, and task completion.
|
|
115
160
|
|
|
116
161
|
**"What is d.clay.studio in my browser URL?"**
|
|
117
|
-
|
|
162
|
+
A DNS-only service that resolves to your local IP for HTTPS certificate validation. No data passes through it. All traffic stays between your browser and your machine. See [clay-dns](clay-dns/) for details.
|
|
118
163
|
|
|
119
|
-
##
|
|
164
|
+
## Our Philosophy
|
|
120
165
|
|
|
121
|
-
|
|
166
|
+
One idea: **user experience sovereignty**.
|
|
122
167
|
|
|
123
|
-
|
|
168
|
+
Not a grand statement. A simple wish: not to have your thinking, your work, and your data locked in the moment a vendor changes a price or rewrites a ToS.
|
|
124
169
|
|
|
125
|
-
|
|
170
|
+
That shows up in the technical choices we made:
|
|
126
171
|
|
|
127
|
-
|
|
172
|
+
- **Your machine is the server.** Browser → your daemon → model API. That's the full chain. No vendor cloud, no relay server, no middle tier syncing your sessions through someone else's infrastructure.
|
|
173
|
+
- **One toggle between vendors.** The adapter layer (YOKE) speaks the Claude Agent SDK and the Codex app-server protocol natively. Switching is a setting, not a migration.
|
|
174
|
+
- **Plain text on disk.** Sessions, Mates, knowledge, and settings live as JSONL and Markdown. No proprietary database. You can `cat`, `grep`, version, and back up everything yourself.
|
|
175
|
+
- **Standard formats only.** CLAUDE.md, AGENTS.md, `.cursorrules`, MCP, Unix cron. If you walk away from Clay, your data walks with you in formats every other tool already understands.
|
|
128
176
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
npx clay-server # Default (port 2633)
|
|
133
|
-
npx clay-server -p 8080 # Specify port
|
|
134
|
-
npx clay-server --yes # Skip interactive prompts (use defaults)
|
|
135
|
-
npx clay-server -y --pin 123456
|
|
136
|
-
# Non-interactive + PIN (for scripts/CI)
|
|
137
|
-
npx clay-server --add . # Add current directory to running daemon
|
|
138
|
-
npx clay-server --remove . # Remove project
|
|
139
|
-
npx clay-server --list # List registered projects
|
|
140
|
-
npx clay-server --shutdown # Stop running daemon
|
|
141
|
-
npx clay-server --dangerously-skip-permissions
|
|
142
|
-
# Bypass all permission prompts (requires PIN at setup)
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
Run `npx clay-server --help` for all options.
|
|
177
|
+
That's the principle. The rest of the README is what it makes possible.
|
|
146
178
|
|
|
147
179
|
## Architecture
|
|
148
180
|
|
|
149
|
-
Clay drives
|
|
181
|
+
Clay is a self-hosted daemon. It drives Claude Code (via the [Claude Agent SDK](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk)) and Codex (via the `codex app-server` JSON-RPC protocol) through a vendor-agnostic adapter layer (**YOKE**), and serves a multi-user web workspace over HTTP/WS. Sessions, Mates, and knowledge live as plain JSONL/Markdown on disk.
|
|
150
182
|
|
|
151
183
|
```mermaid
|
|
152
184
|
graph LR
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
185
|
+
subgraph Clients
|
|
186
|
+
B1["Browser<br/>User A"]
|
|
187
|
+
B2["Browser<br/>User B"]
|
|
188
|
+
Phone["Phone PWA<br/>+ Push"]
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
subgraph Daemon["Clay Daemon (your machine)"]
|
|
192
|
+
Auth["Auth + RBAC"]
|
|
193
|
+
Server["HTTP / WS Server"]
|
|
194
|
+
Project["Project Context"]
|
|
195
|
+
YOKE["YOKE Adapter Layer"]
|
|
196
|
+
MCP["Built-in MCP servers<br/>ask-user / browser /<br/>debate / email"]
|
|
197
|
+
Push["Push (VAPID)"]
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
subgraph Vendors["Agent runtimes"]
|
|
201
|
+
Claude["Claude Agent SDK"]
|
|
202
|
+
Codex["codex app-server<br/>(JSON-RPC stdio)"]
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
B1 <-->|WS| Server
|
|
206
|
+
B2 <-->|WS| Server
|
|
207
|
+
Phone <-->|WS + push| Server
|
|
208
|
+
Server --> Auth
|
|
209
|
+
Server --> Project
|
|
210
|
+
Project --> YOKE
|
|
211
|
+
Project --> MCP
|
|
212
|
+
Project --> Push
|
|
213
|
+
YOKE --> Claude
|
|
214
|
+
YOKE --> Codex
|
|
215
|
+
Push -.-> Phone
|
|
168
216
|
```
|
|
169
217
|
|
|
170
|
-
For
|
|
218
|
+
For sequence diagrams, OS-level isolation, daemon IPC, and key design decisions, see [docs/guides/architecture.md](docs/guides/architecture.md).
|
|
171
219
|
|
|
172
220
|
## Community Projects
|
|
173
221
|
|
|
@@ -195,7 +243,7 @@ If you're using Clay, let us know how in Discussions:
|
|
|
195
243
|
|
|
196
244
|
## Disclaimer
|
|
197
245
|
|
|
198
|
-
Not affiliated with Anthropic. Claude is a trademark of Anthropic. Provided "as is" without warranty. Users are responsible for complying with their AI provider's terms of service.
|
|
246
|
+
Not affiliated with Anthropic or OpenAI. Claude is a trademark of Anthropic. Codex is a trademark of OpenAI. Provided "as is" without warranty. Users are responsible for complying with their AI provider's terms of service.
|
|
199
247
|
|
|
200
248
|
## License
|
|
201
249
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-relay",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.36.0-beta.2",
|
|
4
4
|
"description": "Alias for clay-server — Web UI for Claude Code.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"claude-relay": "./bin/cli.js"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"clay-server": "2.
|
|
9
|
+
"clay-server": "2.36.0-beta.2"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
12
12
|
"claude",
|