@raytrace-cli/cli 0.8.0 → 0.10.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 +499 -266
- package/bin/raytrace.mjs +64 -10
- package/dist/dashboard/assets/{index-DtV3UdEB.css → index-H97VLD5l.css} +1 -1
- package/dist/dashboard/assets/{index-CeIGjyFc.js → index-TqrxOY-Y.js} +2 -2
- package/dist/dashboard/index.html +2 -2
- package/package.json +1 -1
- package/src/agents.mjs +7 -0
- package/src/local-sandbox.mjs +30 -11
- package/src/mcp.mjs +389 -31
- package/src/sandbox.mjs +7 -2
- package/src/share.mjs +86 -0
- package/src/terminal.mjs +68 -0
- package/worker/sandbox/projects.py +22 -7
package/bin/raytrace.mjs
CHANGED
|
@@ -10,14 +10,17 @@ Usage: raytrace <command>
|
|
|
10
10
|
Get started in the cloud (preview):
|
|
11
11
|
1. raytrace auth login sign in, or create your account, in the browser
|
|
12
12
|
2. raytrace sandbox create from a Git repository: upload it to a new sandbox
|
|
13
|
-
3. raytrace connect <sandbox-id>
|
|
13
|
+
3. raytrace connect <sandbox-id> --claude
|
|
14
|
+
a terminal in it, with Claude Code running (or --codex)
|
|
14
15
|
|
|
15
16
|
Cloud sandboxes:
|
|
16
17
|
raytrace auth login|status|logout your RayTrace sign-in
|
|
17
18
|
raytrace sandbox create [--name <name>] upload this Git repository to a new sandbox
|
|
18
19
|
(up to 200 MiB, 25 MiB a file, 20,000 files)
|
|
19
|
-
raytrace connect [id]
|
|
20
|
-
optional (same as: raytrace sandbox shell [id])
|
|
20
|
+
raytrace connect [id] [--claude|--codex] a terminal in it; with one sandbox the id is
|
|
21
|
+
optional (same as: raytrace sandbox shell [id]);
|
|
22
|
+
--claude or --codex starts that agent in it at
|
|
23
|
+
once, without approval prompts
|
|
21
24
|
raytrace --code <code> beta invite: redeem a code RayTrace gave you for one
|
|
22
25
|
$10-credit sandbox (signed in first; also: raytrace code <code>)
|
|
23
26
|
raytrace sandbox list
|
|
@@ -26,16 +29,20 @@ Cloud sandboxes:
|
|
|
26
29
|
delete it; traces go too unless --keep-traces (paid plans)
|
|
27
30
|
|
|
28
31
|
Use from your editor's agent (VS Code, Cursor, Claude Code, any MCP client):
|
|
29
|
-
raytrace mcp MCP server on stdio:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
raytrace mcp MCP server on stdio: create, open, list, start, stop
|
|
33
|
+
and destroy local and cloud sandboxes, and run
|
|
34
|
+
commands in cloud ones. Add it to your editor as:
|
|
35
|
+
npx -y @raytrace-cli/cli@latest mcp
|
|
36
|
+
(Claude Code: claude mcp add --scope user raytrace
|
|
37
|
+
-- npx -y @raytrace-cli/cli@latest mcp)
|
|
32
38
|
|
|
33
39
|
Local sandboxes (your project stays on this machine):
|
|
34
40
|
raytrace sandbox create --local [--name <name>] [--yes]
|
|
35
41
|
a copy of this Git repository in a gVisor sandbox
|
|
36
42
|
in a Linux VM here; the name defaults to the folder's.
|
|
37
43
|
Offers to download Lima if missing (--yes: no prompt)
|
|
38
|
-
raytrace connect <name>
|
|
44
|
+
raytrace connect <name> [--claude|--codex]
|
|
45
|
+
a terminal in it, optionally with that agent running
|
|
39
46
|
raytrace sandbox list --local
|
|
40
47
|
raytrace sandbox start|stop <name>
|
|
41
48
|
raytrace sandbox destroy <name> [--delete-logs | --keep-logs]
|
|
@@ -56,6 +63,11 @@ Export recorded traces:
|
|
|
56
63
|
raytrace export <trace-id> --output <file>
|
|
57
64
|
save export to file with owner-only permissions
|
|
58
65
|
|
|
66
|
+
Share recorded traces (time-limited cloud link):
|
|
67
|
+
raytrace share <trace-id> [--fork] create a share link for peers
|
|
68
|
+
raytrace share --list list your active share links
|
|
69
|
+
raytrace share --revoke <share-id> revoke an active share link
|
|
70
|
+
|
|
59
71
|
AI features in the dashboard (summaries, recaps, Chain of thought), on your own key:
|
|
60
72
|
raytrace key which keys are set
|
|
61
73
|
raytrace key openrouter add your OpenRouter key (asked for, not echoed)
|
|
@@ -120,9 +132,10 @@ if (command === 'auth') {
|
|
|
120
132
|
|
|
121
133
|
// `raytrace connect <id>`: the sandbox's terminal, by the id the dashboard shows.
|
|
122
134
|
if (command === 'connect') {
|
|
123
|
-
const
|
|
124
|
-
const
|
|
125
|
-
|
|
135
|
+
const agents = ['claude', 'codex'].filter((agent) => rest.includes(`--${agent}`));
|
|
136
|
+
const flags = { local: rest.includes('--local'), agent: agents[0] };
|
|
137
|
+
const args = rest.filter((arg) => !['--local', '--claude', '--codex'].includes(arg));
|
|
138
|
+
if (args.length > 1 || args[0]?.startsWith('-') || agents.length > 1) { console.error('Usage: raytrace connect [sandbox-id or local name] [--local] [--claude | --codex]'); process.exit(2); }
|
|
126
139
|
const sandbox = await import('../src/sandbox.mjs');
|
|
127
140
|
try { await sandbox.shell(args[0], flags); process.exit(0); }
|
|
128
141
|
catch (error) { console.error(`raytrace connect: ${error.message}`); process.exit(1); }
|
|
@@ -217,6 +230,47 @@ if (command === 'export') {
|
|
|
217
230
|
}
|
|
218
231
|
}
|
|
219
232
|
|
|
233
|
+
if (command === 'share') {
|
|
234
|
+
let parsed;
|
|
235
|
+
try {
|
|
236
|
+
parsed = parseArgs({ args: rest, strict: true, allowPositionals: true, options: {
|
|
237
|
+
list: { type: 'boolean', short: 'l' },
|
|
238
|
+
revoke: { type: 'string' },
|
|
239
|
+
sandbox: { type: 'string' },
|
|
240
|
+
fork: { type: 'boolean' },
|
|
241
|
+
} });
|
|
242
|
+
} catch (error) {
|
|
243
|
+
console.error(`${error.message}\n\nUsage: raytrace share <trace-id> [--sandbox <id>] [--fork] | raytrace share --list | raytrace share --revoke <id>`);
|
|
244
|
+
process.exit(2);
|
|
245
|
+
}
|
|
246
|
+
const [sub, ...extra] = parsed.positionals;
|
|
247
|
+
const share = await import('../src/share.mjs');
|
|
248
|
+
try {
|
|
249
|
+
if (parsed.values.list || sub === 'list') {
|
|
250
|
+
await share.listShares();
|
|
251
|
+
process.exit(0);
|
|
252
|
+
}
|
|
253
|
+
if (parsed.values.revoke || sub === 'revoke') {
|
|
254
|
+
const shareId = parsed.values.revoke || extra[0];
|
|
255
|
+
if (!shareId) {
|
|
256
|
+
console.error('Usage: raytrace share --revoke <id> (or raytrace share revoke <id>)');
|
|
257
|
+
process.exit(2);
|
|
258
|
+
}
|
|
259
|
+
await share.revokeShare(shareId);
|
|
260
|
+
process.exit(0);
|
|
261
|
+
}
|
|
262
|
+
if (!sub || extra.length > 0) {
|
|
263
|
+
console.error('Usage: raytrace share <trace-id> [--sandbox <id>] [--fork] | raytrace share --list | raytrace share --revoke <id>');
|
|
264
|
+
process.exit(2);
|
|
265
|
+
}
|
|
266
|
+
await share.sharePrompt(sub, { sandboxId: parsed.values.sandbox, allowFork: parsed.values.fork });
|
|
267
|
+
process.exit(0);
|
|
268
|
+
} catch (error) {
|
|
269
|
+
console.error(`raytrace share: ${error.message}`);
|
|
270
|
+
process.exit(1);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
220
274
|
let flags;
|
|
221
275
|
try {
|
|
222
276
|
({ values: flags } = parseArgs({ args: rest, strict: true, options: {
|