@raytrace-cli/cli 0.9.0 → 0.11.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
@@ -2,219 +2,444 @@
2
2
 
3
3
  **See what your coding agent actually did.**
4
4
 
5
- [ npm package ](https://www.npmjs.com/package/@raytrace-cli/cli) ·
6
- [ Quick start ](#quick-start) · [ Cloud sandboxes ](#cloud-sandboxes-preview) ·
7
- [ Editor (MCP) ](#use-from-your-editor-mcp) ·
8
- [ Local sandboxes ](#local-sandboxes) ·
9
- [ Privacy ](#privacy) · [ Report an issue ](https://github.com/Godcreatebugs/raytrace-cli/issues)
10
-
11
- Your agent finished the task. Which files did it read? What commands did it run?
12
- Where did the tokens and money go?
13
-
14
- RayTrace turns Claude Code and Codex sessions into a dashboard you can explore:
15
- prompts, answers, tool calls, cost, and captured context. Run your agent in a
16
- RayTrace cloud sandbox and review every session with your team.
5
+ [npm package](https://www.npmjs.com/package/@raytrace-cli/cli) ·
6
+ [Set up in your editor (MCP)](#set-up-in-your-editor-mcp) ·
7
+ [Local sandboxes](#local-sandboxes) ·
8
+ [Cloud sandboxes](#cloud-sandboxes) ·
9
+ [What you can do](#what-you-can-do-with-a-recorded-session) ·
10
+ [Commands](#commands) ·
11
+ [Report an issue](https://github.com/Godcreatebugs/raytrace-cli/issues)
12
+
13
+ Your agent finished the task. Which files did it read? What commands did it
14
+ run? Where did the tokens and money go?
15
+
16
+ RayTrace runs Claude Code or Codex in a **sandbox**, an isolated copy of your
17
+ project, and records everything that happens there: your prompts, the agent's
18
+ answers and tool calls, and every command that actually ran, with its exit code
19
+ and network connections. You explore it all in a dashboard.
17
20
 
18
21
  ![RayTrace tool-call timeline showing commands, reported results, cost, time, and token usage](https://raw.githubusercontent.com/Godcreatebugs/raytrace-cli/main/docs/images/tool-calls.jpg)
19
22
 
20
23
  *One real coding task: 50 model round trips, 58 tool calls, and a command-by-command record.*
21
24
 
22
- - **Follow the work.** Open a prompt and trace the steps that led to its answer.
23
- - **Inspect the evidence.** Expand tool calls to see commands and their reported output.
24
- - **Understand the cost.** See model, token usage, time, and cost when available.
25
- - **Explore the context.** Review earlier conversation and files brought into the task.
25
+ ## Pick how you want to use it
26
+
27
+ | | Where it runs | Account | Best for |
28
+ |---|---|---|---|
29
+ | **[From your editor (MCP)](#set-up-in-your-editor-mcp)** | local or cloud, you choose per sandbox | only for cloud | asking your agent "put this repo in a sandbox and open it" |
30
+ | **[Local sandbox](#local-sandboxes)** | a Linux VM on your machine | none | keeping your code on your machine; free and open source |
31
+ | **[Cloud sandbox](#cloud-sandboxes)** | RayTrace's servers | yes | sharing sessions with your team at [app.raytracer.si](https://app.raytracer.si) |
32
+
33
+ All three need **Node.js 22.13 or newer** (`node --version`) on macOS or Linux,
34
+ or none at all from pip: `pip install raytrace` (or `uv tool install raytrace`)
35
+ installs the same CLI with its own Node.js. Where this page says
36
+ `npx -y @raytrace-cli/cli@latest`, use `uvx raytrace` instead.
37
+ Windows is experimental.
38
+
39
+ ---
26
40
 
27
- ## Quick start
41
+ ## Set up in your editor (MCP)
28
42
 
29
- You need **Node.js 22.13 or newer** (`node --version`). macOS and Linux are
30
- supported. To keep your project on your own machine instead, see
31
- [Local sandboxes](#local-sandboxes).
43
+ `raytrace mcp` is an [MCP](https://modelcontextprotocol.io) server. Add it to
44
+ your editor once, and your agent can create, open, stop and destroy sandboxes
45
+ for you. There is nothing to install first: `npx` downloads the CLI on first use.
46
+
47
+ ### 1. Add the server
48
+
49
+ **Claude Code.** One command, then restart Claude Code. `--scope user` makes it
50
+ available in every project:
32
51
 
33
52
  ```sh
34
- npm install -g @raytrace-cli/cli
35
- raytrace auth login # opens your browser: sign in, or create your account
36
- cd your-project # any Git repository
37
- raytrace sandbox create # uploads it to a new cloud sandbox and prints its id
38
- raytrace connect <sandbox-id> # a terminal in the sandbox: run claude or codex there
53
+ claude mcp add --scope user raytrace -- npx -y @raytrace-cli/cli@latest mcp
39
54
  ```
40
55
 
41
- `auth login` prints a short code and opens the sign-in page. New here? Create
42
- your account on that page, approve the code, and come back to the terminal.
43
-
44
- Then open **[app.raytracer.si](https://app.raytracer.si)** to review the
45
- session with your team: prompts, tool calls, and the commands that actually
46
- ran. You can also create the sandbox there, by dropping a project folder on the
47
- Sandboxes page. RayTrace asks you for no API key. See
48
- [Cloud sandboxes](#cloud-sandboxes-preview) for what is uploaded and the limits.
49
-
50
- ## Cloud sandboxes (preview)
51
-
52
- A cloud sandbox is an isolated copy of your project on RayTrace's servers, with
53
- a terminal you open from your machine. Run Claude Code or Codex inside it: what
54
- the agent asked, the tool calls it made, and the commands that actually ran are
55
- recorded for your organization.
56
-
57
- The [quick start](#quick-start) has the commands. If you skip `raytrace auth
58
- login`, `raytrace sandbox create` and `raytrace connect` start the same sign-in
59
- first. With one sandbox, `raytrace connect` works without the id.
60
-
61
- At **[app.raytracer.si](https://app.raytracer.si)**, sign in with the same
62
- account to see your organization's prompts, sandboxes and tool calls. A sandbox
63
- created there shows the command to open it, `raytrace connect <sandbox-id>`.
64
- Sandboxes belong to the account that made them: `raytrace auth status` says
65
- which one the CLI is using.
66
-
67
- - **What is uploaded:** the files Git would track in the repository (including
68
- new files it does not ignore), without `.git`, dependencies such as
69
- `node_modules`, build output, `.env*` files, private keys (`.pem`, `.key`,
70
- `.p12`, `.pfx`) and common credential files (`.npmrc`, `.netrc`, `id_rsa`, …).
71
- Review your project for secrets inside other files before you upload.
72
- - **Limits:** a project may be up to 200 MiB and 20,000 files, each file up to
73
- 25 MiB (100 MiB once packed). A project over a limit is refused, with the
74
- files named, and nothing is uploaded; add them to `.gitignore`. You can have
75
- three sandboxes at a time.
76
- - **Signing in to your agent:** sign in to Claude Code inside the sandbox as
77
- you would on your machine. That sign-in stays in the sandbox until you
78
- destroy it.
79
- - **When you are done:** `raytrace sandbox stop` keeps the files;
80
- `raytrace sandbox destroy` deletes them and any sign-in made inside. The
81
- recorded sessions are kept for your organization.
82
-
83
- Cloud sandboxes are a preview and may change; please
84
- [report issues](https://github.com/Godcreatebugs/raytrace-cli/issues) you run into.
85
-
86
- ## Use from your editor (MCP)
87
-
88
- `raytrace mcp` is an [MCP](https://modelcontextprotocol.io) server, so the agent
89
- in VS Code, Cursor, Claude Code or any MCP client can create and manage
90
- sandboxes for you, in the cloud or on your machine: "put this project in a
91
- sandbox", "connect this repo to a local sandbox", "stop my sandbox". Nothing to
92
- install first; `npx` fetches the CLI.
93
-
94
- - **Claude Code:** `claude mcp add raytrace -- npx -y @raytrace-cli/cli mcp`
95
- - **VS Code** (`.vscode/mcp.json`):
96
- ```json
97
- { "servers": { "raytrace": { "command": "npx", "args": ["-y", "@raytrace-cli/cli", "mcp"] } } }
98
- ```
99
- - **Cursor** (`~/.cursor/mcp.json`) and most other clients:
100
- ```json
101
- { "mcpServers": { "raytrace": { "command": "npx", "args": ["-y", "@raytrace-cli/cli", "mcp"] } } }
102
- ```
103
-
104
- Tools: `login`, `create_sandbox`, `list_sandboxes`, `sandbox_status`,
105
- `start_sandbox`, `stop_sandbox`, `destroy_sandbox`, `run_command`,
106
- `get_command_result`, `cancel_command`. The first time, the agent
107
- calls `login` and shows you a code to approve in the browser; it is the same
108
- sign-in as `raytrace auth login`. `create_sandbox` uploads the Git project open
109
- in your editor, with the same rules and limits as `raytrace sandbox create`.
110
- `destroy_sandbox` deletes the sandbox's traces too unless the agent passes
111
- `keep_traces` (paid plans), as `raytrace sandbox destroy --yes` does.
112
-
113
- **Working in the sandbox with Claude Code.** After `create_sandbox`, a new
114
- terminal opens connected to the sandbox with Claude Code starting in it, and the
115
- session you have there is recorded (`connect: false` skips this).
116
- `connect_sandbox` does the same for a sandbox you already have: "open my sandbox
117
- with Claude". The terminal opens where your agent runs when it can: a new tmux
118
- window inside tmux, a new iTerm window or WezTerm tab; otherwise a new Terminal
119
- window on macOS (also from VS Code, whose built-in terminal cannot be opened from
120
- outside), the desktop's terminal on Linux, or Windows Terminal. macOS asks once
121
- whether your terminal may be controlled. If no terminal can be opened, the agent
122
- gives you the command: `raytrace connect <id or name> --claude`. Claude Code runs
123
- there with `--dangerously-skip-permissions`: it does not stop to ask before each
124
- command, because the sandbox is what contains it, and everything it does is
125
- recorded. Files the project's owner restricted stay locked. The first time in
126
- each sandbox, Claude Code asks you to sign in and to accept that mode.
127
-
128
- **Running commands from the chat.** `run_command` starts a shell command in the
129
- sandbox's `/workspace` (up to 4 at a time, 120 s by default, at most 1,800 s) and
130
- returns at once with a command id. `get_command_result` gives its state, the real
131
- exit code (*unknown* is never reported as success) and the last 20,000 characters
132
- of stdout and stderr; `wait_seconds` (up to 30) waits for a running command, so
133
- the agent does not have to poll. `cancel_command` stops it and everything it
134
- started. What a command prints comes from your project, so the agent is told to
135
- treat it as data, not as instructions. This needs a RayTrace server with the
136
- command API; on one without it the tools say so, and you can still run
137
- `raytrace connect <id>` yourself in a terminal (it needs a real terminal, which
138
- an agent's own shell does not have). Running commands works on cloud sandboxes
139
- only.
140
-
141
- **Local sandboxes from the chat.** Ask for a local sandbox and the agent calls
142
- `create_sandbox` with `local: true`: the same as `raytrace sandbox create --local`
143
- in the project, so nothing is uploaded and no RayTrace sign-in is needed. If Lima
144
- is not installed, the agent asks you before downloading it (`install_lima`). The
145
- first local sandbox sets up the Linux VM, which takes several minutes: the agent
146
- gets an answer after about a minute and follows the rest with `sandbox_status`,
147
- and the setup carries on even if the chat ends. `list_sandboxes` shows local and
148
- cloud sandboxes together; `start_sandbox`, `stop_sandbox`, `sandbox_status` and
149
- `destroy_sandbox` and `connect_sandbox` take a local sandbox's name. Destroying one archives its
150
- captured logs to `~/.raytrace/archive` unless the agent passes `delete_logs`
151
- (`upload_first` uploads its evidences to the cloud before). To work in it, run
152
- `raytrace connect <name> --claude` in a terminal, or ask for `connect_sandbox`.
56
+ Check it with `claude mcp list`, which should show `raytrace` as connected.
57
+
58
+ **Cursor.** Add to `~/.cursor/mcp.json` (every project) or `.cursor/mcp.json` (one project):
59
+
60
+ ```json
61
+ {
62
+ "mcpServers": {
63
+ "raytrace": { "command": "npx", "args": ["-y", "@raytrace-cli/cli@latest", "mcp"] }
64
+ }
65
+ }
66
+ ```
67
+
68
+ **VS Code.** Add to `.vscode/mcp.json` in the project, or run **MCP: Open User
69
+ Configuration** from the command palette for every project:
70
+
71
+ ```json
72
+ {
73
+ "servers": {
74
+ "raytrace": { "command": "npx", "args": ["-y", "@raytrace-cli/cli@latest", "mcp"] }
75
+ }
76
+ }
77
+ ```
78
+
79
+ **Codex.** `codex mcp add raytrace -- npx -y @raytrace-cli/cli@latest mcp`
80
+
81
+ **Any other MCP client.** Run the command `npx` with the arguments
82
+ `-y @raytrace-cli/cli@latest mcp`, over stdio. Most clients use the same
83
+ `mcpServers` JSON as Cursor.
84
+
85
+ > Already have the CLI installed globally? You can use `raytrace mcp` as the
86
+ > command instead of `npx`.
87
+
88
+ ### 2. Ask for a sandbox
89
+
90
+ Open a Git project in your editor and ask your agent in plain words:
91
+
92
+ | You say | What happens |
93
+ |---|---|
94
+ | "Create a local sandbox and connect this repo" | a sandbox on your machine, then a terminal opens with Claude Code running in it |
95
+ | "Put this project in a cloud sandbox" | uploads the repo to RayTrace's cloud, then opens a terminal with Claude Code in it |
96
+ | "Open my sandbox with Codex" | a terminal connected to an existing sandbox, with Codex running in it |
97
+ | "List my sandboxes" / "Stop demo-box" / "Destroy it" | manages them; the agent asks you before it destroys anything |
98
+ | "Run `npm test` in the sandbox" | runs a command in a cloud sandbox and reports the result back in the chat |
99
+
100
+ **The first time:**
101
+
102
+ - **Cloud sandboxes** need a RayTrace sign-in. The agent shows you a short code
103
+ and opens a browser page. Approve it there (or create your account), and the
104
+ agent carries on. Local sandboxes need no account.
105
+ - **The first local sandbox** sets up a Linux VM, which takes a few minutes. If
106
+ [Lima](https://lima-vm.io) is missing, the agent asks before downloading it.
107
+ See [what you need](#what-you-need).
108
+ - **In each new sandbox**, Claude Code or Codex asks you to sign in to your
109
+ Anthropic or OpenAI account, as it would on your machine.
110
+ - **On macOS**, the first time a terminal is opened for you, macOS asks whether
111
+ your editor may control your terminal app. Allow it.
112
+
113
+ ### 3. Work in the sandbox
114
+
115
+ The terminal opens where you work: a new tmux window if you're in tmux, a new
116
+ iTerm window or WezTerm tab, otherwise a new Terminal window on macOS (VS Code's
117
+ built-in terminal can't be opened from outside), your desktop's terminal on
118
+ Linux, or Windows Terminal. If none can be opened, the agent gives you the
119
+ command to paste instead, such as `raytrace connect demo-box --claude`.
120
+
121
+ Inside, the agent runs **without approval prompts**. The sandbox is what keeps
122
+ it contained, so there's no need to approve every command, and everything it
123
+ does is recorded. See [Working in a sandbox](#working-in-a-sandbox).
124
+
125
+ ### MCP tools reference
126
+
127
+ | Tool | What it does |
128
+ |---|---|
129
+ | `login` | signs in to RayTrace (cloud only): shows a code to approve in the browser |
130
+ | `create_sandbox` | copies the open Git project into a new sandbox. `local: true` for one on your machine, `agent: "codex"` to open it with Codex, `connect: false` to skip opening a terminal |
131
+ | `connect_sandbox` | opens a terminal in an existing sandbox with Claude Code (default), Codex (`agent: "codex"`) or a plain shell (`agent: "none"`); starts it first if it's stopped |
132
+ | `list_sandboxes`, `sandbox_status` | your local and cloud sandboxes, and one sandbox's details or creation progress |
133
+ | `start_sandbox`, `stop_sandbox` | stopping keeps the files |
134
+ | `destroy_sandbox` | deletes a sandbox. Cloud: its traces go too, unless `keep_traces` (paid plans). Local: its logs are archived, unless `delete_logs` |
135
+ | `run_command`, `get_command_result`, `cancel_command` | run shell commands in a cloud sandbox from the chat: up to 4 at once, 120 s by default and at most 30 minutes, with the real exit code and output |
136
+
137
+ Local sandboxes are named by their name and cloud ones by their id (`rtp-…`).
138
+ Whatever a command prints is treated as data from your project, never as
139
+ instructions to the agent.
140
+
141
+ ---
153
142
 
154
143
  ## Local sandboxes
155
144
 
156
- Prefer to keep your project on your own machine? Run the same sandbox locally.
157
- It is open source and needs no RayTrace account.
145
+ Run the sandbox on your own machine. Your project is copied into it, and nothing
146
+ is uploaded. It is open source and needs no RayTrace account.
147
+
148
+ ### What you need
149
+
150
+ | | Requirement |
151
+ |---|---|
152
+ | **macOS 13.5 or later** | Nothing to install. RayTrace uses your [Lima](https://lima-vm.io) 2.0+ if you have it, or offers to download Lima into `~/.raytrace/lima` (no admin rights; checked against a pinned checksum) |
153
+ | **Older macOS** | QEMU too: `brew install qemu` |
154
+ | **Linux** | Lima, QEMU, and access to `/dev/kvm` (`sudo usermod -aG kvm $USER`, then log out and in) |
155
+ | **Windows** | experimental; RayTrace doesn't download Lima there |
156
+ | **Disk and memory** | the first setup downloads about 1 GB; the VM uses 4 GiB of memory while it runs |
157
+
158
+ `raytrace doctor` checks all of this and says how to fix anything missing.
159
+
160
+ ### Set it up
158
161
 
159
162
  ```sh
160
- cd your-project
161
- raytrace sandbox create --local --name my-box # first run sets up a Linux VM; a few minutes
162
- raytrace connect my-box # a terminal in it: run claude there
163
- raytrace sandbox destroy my-box # asks whether to delete its logs too
163
+ npm install -g @raytrace-cli/cli
164
+
165
+ cd your-project # any Git repository
166
+ raytrace sandbox create --local # first time: sets up the VM, a few minutes
167
+ raytrace connect your-project --claude # a terminal in it, with Claude Code running
164
168
  ```
165
169
 
166
- - **How it runs:** a Linux VM made with [Lima](https://lima-vm.io), and inside
167
- it each sandbox in a Docker container under [gVisor](https://gvisor.dev),
168
- with no access to your machine's files or private networks. A copy of the
169
- project goes in, picked the same way as for a cloud sandbox; your own files
170
- are never changed. `--name` defaults to the repository folder's name.
171
- - **What is recorded:** the commands, file changes and network connections the
172
- sandbox makes, by a collector outside it that the agent cannot turn off,
173
- and its Claude Code sessions. All of it is in your local dashboard
174
- (`raytrace open`): **Sandboxes** lists each sandbox with its prompts, and
175
- **Sandbox evidence** shows, for one prompt, every command that actually ran,
176
- its exit code and what it reached on the network, each joined to the tool
177
- call that ran it. The raw collector feed is at `/raytace/viewer/` on the
178
- dashboard's address.
179
- Nothing leaves your machine.
180
- - **Changes:** the sandbox's Claude Code hook snapshots the project after
181
- every edit, so **Changes** shows what each prompt left different, file by
182
- file, with a patch to take home.
183
- - **Playground:** rerun a session from any step with part of it changed (a
184
- tool result, a file, the model, the message) and compare where it ends up,
185
- optionally with a check command such as `npm test` as pass or fail. Each
186
- rerun is a fork: a sandbox of its own in the VM, started from the snapshot
187
- just before that step, running Claude Code on the sign-in you made in the
188
- sandbox (so it uses your Claude account). The newest fork is kept, stopped,
189
- for a day; destroying a sandbox destroys its forks.
190
- - **Signing in to your agent:** run `claude` inside the sandbox and sign in.
191
- RayTrace passes no key in. The sign-in stays in the sandbox until you destroy it.
192
- - **Destroying it:** `raytrace sandbox destroy <name>` deletes the sandbox and
193
- asks whether to delete the logs captured in it as well. Yes deletes them
194
- everywhere, dashboard included, Playground forks too. No moves them to
195
- `~/.raytrace/archive/<name>-<time>/` (Claude Code transcripts, its forks'
196
- under `forks/`, and the recorded commands, files and connections as JSON
197
- lines), and its sessions stay in your dashboard. `--delete-logs` or `--keep-logs` answers without
198
- asking.
199
- - **What you need:** nothing to install on macOS 13.5 or later. RayTrace
200
- uses [Lima](https://lima-vm.io) for the VM: yours if you have Lima 2.0 or
201
- later, otherwise it offers to download Lima's own release into
202
- `~/.raytrace/lima` (no admin rights; checked against a pinned checksum).
203
- Docker, gVisor and the agents are installed inside the VM, not on your
204
- machine. On Linux, also QEMU and access to `/dev/kvm`. On macOS before
205
- 13.5, QEMU (`brew install qemu`). `raytrace doctor` shows what is missing,
206
- and `create --local` says so before it starts. First run downloads about
207
- 1 GB (Lima, Ubuntu, packages); the VM uses 4 GiB of memory while it runs.
208
- - **Platforms:** macOS and Linux. Windows is experimental: Lima's Windows
209
- support is itself experimental, and RayTrace does not download Lima there.
210
- - **The VM:** `limactl stop raytrace` frees its memory; `limactl delete
211
- raytrace` removes it.
212
-
213
- ## AI features, on your own key
214
-
215
- The dashboard records and shows everything above without any key. A few
216
- views can also ask a model to explain a run; locally they use **your own
217
- OpenRouter key**, and the calls are billed to your OpenRouter account.
170
+ - The sandbox is named after the folder. Use `--name my-box` to choose the name.
171
+ - Use `--codex` instead of `--claude` to start Codex, or leave both off for a
172
+ plain shell where you run `claude` or `codex` yourself.
173
+ - `connect` prints a link to the dashboard showing only this sandbox's prompts.
174
+ `raytrace open` opens the full dashboard.
175
+
176
+ Or skip the commands and ask your editor's agent:
177
+ [set up MCP](#set-up-in-your-editor-mcp), then say "create a local sandbox and
178
+ connect this repo".
179
+
180
+ ### Day to day
181
+
182
+ ```sh
183
+ raytrace sandbox list --local # your local sandboxes
184
+ raytrace connect my-box --claude # back in; the sandbox keeps running when you leave
185
+ raytrace sandbox stop my-box # stop it; its files are kept
186
+ raytrace sandbox start my-box
187
+ raytrace sandbox destroy my-box # asks whether to delete its captured logs too
188
+ limactl stop raytrace # stop the whole VM to free its 4 GiB of memory
189
+ ```
190
+
191
+ When you destroy a sandbox, you're asked what to do with its logs:
192
+
193
+ - **Yes** deletes them everywhere, the dashboard and Playground forks included.
194
+ - **No** moves them to `~/.raytrace/archive/<name>-<time>/`: the agent
195
+ transcripts, the recorded commands, files and connections as JSON lines, and
196
+ any forks. Its sessions stay in your dashboard.
197
+
198
+ `--delete-logs` or `--keep-logs` answers without asking. To keep the logs in the
199
+ cloud, `raytrace upload logs --sandbox my-box` sends them to
200
+ [app.raytracer.si](https://app.raytracer.si) (needs a sign-in).
201
+
202
+ ### How it works
203
+
204
+ - **Isolation:** each sandbox is a Docker container under
205
+ [gVisor](https://gvisor.dev), inside a Linux VM made with
206
+ [Lima](https://lima-vm.io). It can't see your machine's files or private
207
+ networks. A copy of your project goes in (picked the same way as for
208
+ [cloud uploads](#what-is-uploaded)); your own files are never changed.
209
+ - **Resources:** each sandbox gets 2 GB of memory, 2 CPUs, 256 processes and a
210
+ 512 MB `/tmp`. All sandboxes share the VM's 30 GiB disk.
211
+ - **Recording:** a collector outside the sandbox, which the agent can't turn
212
+ off, records every command, file change and network connection. Claude Code's
213
+ prompts, answers and tool calls go to your local dashboard as well. Nothing
214
+ leaves your machine.
215
+ - **Changes:** the project is snapshotted after every edit, so **Changes** in
216
+ the dashboard shows what each prompt left different, with a patch to take home.
217
+ - **Playground:** rerun a session from any step with something changed (a tool
218
+ result, a file, the model or the message) and compare the outcomes,
219
+ optionally with a check such as `npm test`. Each rerun is a fork, a sandbox
220
+ of its own started from the snapshot just before that step.
221
+
222
+ ---
223
+
224
+ ## Cloud sandboxes
225
+
226
+ A cloud sandbox is the same isolated copy of your project, on RayTrace's
227
+ servers, with sessions recorded for your organization at
228
+ **[app.raytracer.si](https://app.raytracer.si)**. This is a preview.
229
+
230
+ ```sh
231
+ npm install -g @raytrace-cli/cli
232
+ raytrace auth login # opens your browser: sign in, or create your account
233
+ cd your-project # any Git repository
234
+ raytrace sandbox create # uploads it and prints the sandbox id
235
+ raytrace connect <sandbox-id> --claude # a terminal in it, with Claude Code running
236
+ ```
237
+
238
+ `auth login` prints a short code and opens the sign-in page; approve it there.
239
+ If you skip it, `sandbox create` and `connect` ask you to sign in first. With
240
+ one sandbox, `connect` needs no id. You can also create a sandbox in the web
241
+ dashboard by dropping a project folder on the **Sandboxes** page.
242
+
243
+ ### What is uploaded
244
+
245
+ The files Git would track (including new files it doesn't ignore), **without**
246
+ `.git`, dependencies such as `node_modules`, build output, `.env*` files, private
247
+ keys (`.pem`, `.key`, `.p12`, `.pfx`) and common credential files (`.npmrc`,
248
+ `.netrc`, `id_rsa`, …). Check for secrets inside other files before you upload.
249
+
250
+ ### Limits
251
+
252
+ - **Project size:** up to 200 MiB and 20,000 files, each file up to 25 MiB
253
+ (100 MiB once packed). A project over a limit is refused, with the files
254
+ named, and nothing is uploaded; add those files to `.gitignore`.
255
+ - **Sandboxes at a time:** Beta 1, Individual 5, Team & Enterprise 20.
256
+ Destroyed ones don't count.
257
+ - **Each sandbox:** 2 GB of memory, 2 CPUs, 256 processes, a 512 MB `/tmp`.
258
+
259
+ ### When you are done
260
+
261
+ `raytrace sandbox stop` keeps the files. `raytrace sandbox destroy` deletes them
262
+ and any sign-in made inside, along with the recorded traces. To keep the traces,
263
+ use `--keep-traces` (paid plans).
264
+
265
+ ---
266
+
267
+ ## Working in a sandbox
268
+
269
+ - **Claude Code and Codex are preinstalled** in every sandbox, local and cloud.
270
+ - **No approval prompts.** `--claude` starts Claude Code with
271
+ `--dangerously-skip-permissions`, and `--codex` starts Codex with
272
+ `--dangerously-bypass-approvals-and-sandbox`. The sandbox's own settings, which
273
+ the agent can't change, make this the default too, so typing `claude` or
274
+ `codex` yourself works the same way. The sandbox is what keeps the agent
275
+ contained, and every command is recorded.
276
+ - **Restricted files stay locked.** Files a project's owner restricts in the
277
+ dashboard (**Initial scan**) can't be changed by the agent, whatever it tries.
278
+ - **Signing in:** sign in to Claude Code or Codex inside the sandbox, as you
279
+ would on your machine. The sign-in stays in that sandbox until you destroy it.
280
+ - **Leaving:** exiting the agent drops you into the sandbox's shell, and exiting
281
+ that leaves the sandbox running. `raytrace connect` takes you back.
282
+
283
+ In local sandboxes, Codex's prompts don't reach the dashboard's **Prompts** page
284
+ yet. Its commands, file changes and network connections are recorded.
285
+
286
+ ---
287
+
288
+ ## What you can do with a recorded session
289
+
290
+ Cloud sessions are at [app.raytracer.si](https://app.raytracer.si), and
291
+ `raytrace open` opens the same pages for your local sandboxes. Every page is
292
+ about one prompt, and they link to each other, so you can go from "what did I
293
+ ask" to "what actually ran" to "what if it had gone differently" in a couple of
294
+ clicks. The screenshots below are from the cloud dashboard, with a session in
295
+ the `raytrace-demo-shop` sandbox.
296
+
297
+ ### Prompts: what you asked, and what came back
298
+
299
+ ![The Prompts page: an activity calendar and the list of prompts, each tagged with where it ran, the model, tool calls and cost](https://raw.githubusercontent.com/Godcreatebugs/raytrace-cli/main/docs/images/prompts.jpg)
300
+
301
+ Every prompt you gave the agent, newest first, with an activity calendar on
302
+ top. Each row shows where it ran (Mac, local sandbox or cloud sandbox), the
303
+ model, how many tool calls it took and what it cost. Open one to read the
304
+ answer and a short recap of the run.
305
+
306
+ ![An opened prompt with its recap: what happened, probably why, and what is worth checking, with links to Tool calls, Sandbox evidence and Context](https://raw.githubusercontent.com/Godcreatebugs/raytrace-cli/main/docs/images/prompt-recap.jpg)
307
+
308
+ - **Find a session again:** click a day in the calendar, or add
309
+ `?box=<sandbox id>` to see a single sandbox's prompts.
310
+ - **Spot the expensive ones:** the cost and tool-call count are on every row.
311
+
312
+ ### Tool calls: how the agent got there
313
+
314
+ <!-- screenshot: the one at the top of this README (docs/images/tool-calls.jpg) -->
315
+
316
+ The path from your prompt to the answer: one divider for each round trip to the
317
+ model, one row for each tool call it proposed, with the command and what the
318
+ agent says came back, plus tokens, time and cost at each step.
319
+
320
+ - **Follow its reasoning step by step,** and see where it went in circles.
321
+ - **See where the tokens went:** which steps were the expensive ones.
322
+
323
+ ### Sandbox evidence: what actually ran
324
+
325
+ ![Sandbox evidence: each process the sandbox saw run, with its exit code, duration and severity, and a plain-English description](https://raw.githubusercontent.com/Godcreatebugs/raytrace-cli/main/docs/images/sandbox-evidence.jpg)
326
+
327
+ What the agent *says* it ran is in Tool calls. This page is what the sandbox
328
+ itself saw, recorded from outside the agent where it can't be turned off or
329
+ edited. You get every process in time order, with its real exit code, the files
330
+ it read or changed, where it connected and what it installed. Each process is
331
+ tied to the tool call that started it, and anything no tool call accounts for
332
+ shows up too.
333
+
334
+ - **Check the agent's claims:** "tests pass" against the real exit code.
335
+ - **Catch side effects:** a script that phoned home, a package you didn't ask
336
+ for, a file outside the task that got changed.
337
+
338
+ ### Changes: what the prompt left different
339
+
340
+ <!-- screenshot: docs/images/changes.png -->
341
+
342
+ Every file the prompt changed, with its diff, first for the whole prompt and
343
+ then step by step, so you see which tool call made which change. Download it all
344
+ as one patch and apply it to your own checkout.
345
+
346
+ - **Review the agent's work like a pull request,** before you take it.
347
+ - **Take the result home:** the sandbox works on a copy, and the patch brings
348
+ the changes back to your machine.
349
+
350
+ ### Context: what the model could see
351
+
352
+ <!-- screenshot: docs/images/context.png -->
353
+
354
+ What was in the model's context when it answered, in three parts:
355
+
356
+ - what you said earlier in the conversation;
357
+ - what the model brought in itself: its earlier answers, and the files it read,
358
+ with how much of each actually fit;
359
+ - what the agent's harness adds to every request.
360
+
361
+ Use it to:
362
+
363
+ - **Understand a wrong answer:** was the right file never read, or cut off?
364
+ - **Test a hunch:** "Rerun without this" on any file opens the Playground with
365
+ that file removed.
366
+
367
+ ### Playground: rerun it differently, and compare
368
+
369
+ ![The Playground: pick a step, change the message, files, check command or model, and run forks](https://raw.githubusercontent.com/Godcreatebugs/raytrace-cli/main/docs/images/playground.jpg)
370
+
371
+ Pick any step of a session and rerun from there with something changed: an
372
+ earlier tool result removed or edited, a file in the project, the model, or the
373
+ time limit. Each rerun is a fork, a sandbox of its own started from a snapshot
374
+ taken just before that step, running in parallel with the others. Add a check
375
+ such as `npm test` and every fork is graded pass or fail. Run a change several
376
+ times and you get its pass rate, cost and steps, next to the same step rerun
377
+ unchanged.
378
+
379
+ - **Find out what actually mattered:** would it still have broken the build
380
+ without that misleading test output?
381
+ - **Compare models on your own task:** same step, same files, a different model.
382
+ - **Compare outcomes side by side:** each fork's answer, steps and files next to
383
+ the original's.
384
+
385
+ ### Story and Chain of thought: why it did what it did
386
+
387
+ ![Chain of thought: a recap of the run, the likely reason for each step with its share, and what is worth checking](https://raw.githubusercontent.com/Godcreatebugs/raytrace-cli/main/docs/images/chain-of-thought.jpg)
388
+
389
+ **Story** is the short version of a long run. It shows a timeline of only the
390
+ steps that mattered, the single most consequential command pulled out at the
391
+ top, and for each step what the agent could see, what it proposed, what really
392
+ happened and what that led to.
393
+
394
+ **Chain of thought** takes each tool call and lists its likely causes among what
395
+ the agent could see: your request, an earlier result, its own plan, or the
396
+ project's instructions.
397
+
398
+ Both are worked out from the recording alone, with nothing rerun. Some parts
399
+ use [your own key](#ai-features-on-your-own-key).
400
+
401
+ - **Explain a run to someone else** without replaying all 60 steps.
402
+ - **Trace a bad decision back** to the result or instruction that caused it.
403
+
404
+ ### Search: across everything the agents did
405
+
406
+ <!-- screenshot: docs/images/search.png -->
407
+
408
+ Search every recorded session at once, failures first. Type free text, or use
409
+ filters such as `outcome:failed tool:Bash exit:>=1 file:.env`, and summarise
410
+ with a pipe: `| stats count by tool`. With no query, it shows the most common
411
+ failures lately.
412
+
413
+ - **Find patterns:** which commands fail most, and which sessions touched
414
+ `.env`.
415
+
416
+ ### Initial scan: guard the files that matter
417
+
418
+ ![Initial scan: every file of the project grouped by risk level, with counts of watched and restricted files](https://raw.githubusercontent.com/Godcreatebugs/raytrace-cli/main/docs/images/initial-scan.jpg)
419
+
420
+ When a project goes into a sandbox, every file is rated from 1 to 5 for how
421
+ risky it is to change, with the reason. Secrets, migrations and deploy
422
+ configuration rate highest. You can move any file up or down, choose which
423
+ files to be alerted about, and **restrict** files so the agent can't change them
424
+ at all, whatever it tries. **Alerts** lists what the agent did to those files:
425
+ changes, refused edits, reads, and commands that named them.
426
+
427
+ - **Let the agent work freely** while keeping your migrations and CI config
428
+ off-limits.
429
+
430
+ ![Initial scan alerts: watched files such as config/payment-keys.js being read, each seen by the kernel, with the tool that did it](https://raw.githubusercontent.com/Godcreatebugs/raytrace-cli/main/docs/images/initial-scan-alerts.jpg)
431
+ - **Get told** when it touches what you care about.
432
+
433
+ ### Sandboxes: where it all ran
434
+
435
+ Every sandbox, grouped by the machine it runs on, with what was asked in each.
436
+ Destroyed sandboxes stay listed, because their evidence outlives them.
437
+
438
+ ### AI features, on your own key
439
+
440
+ Everything above works without any key. A few views can also ask a model to
441
+ explain a run, using **your own OpenRouter key**, billed to your OpenRouter
442
+ account:
218
443
 
219
444
  ```sh
220
445
  raytrace key openrouter # paste your key from https://openrouter.ai/keys (not echoed)
@@ -227,155 +452,125 @@ raytrace key # which keys are set
227
452
  | Chain of thought: the likely reasons for each tool call | Chain of thought | `qwen/qwen3-coder` |
228
453
  | Step summaries, and plain-English lines for commands no rule describes | Tool calls, Sandbox evidence | `openai/gpt-oss-120b` |
229
454
 
230
- - **Without a key** those parts say so and everything else works: Story's key
231
- moments, Chain of thought's unranked reasons and the rule-based command
232
- descriptions need no model.
233
- - **Cost:** each answer is kept, so opening the same prompt again costs
234
- nothing. Nothing is sent until you open a view that needs it.
235
- - **What is sent:** to OpenRouter, the parts of the recorded run the feature
236
- reads (the prompt, tool calls and their results, commands). Nothing goes to
237
- RayTrace.
455
+ - **No key?** Those parts say so, and everything else works.
456
+ - **Cost:** each answer is kept, so opening the same prompt again is free.
457
+ Nothing is sent until you open a view that needs it.
458
+ - **What's sent:** only to OpenRouter, the parts of the run the feature reads.
459
+ Nothing goes to RayTrace.
238
460
  - **Other models:** set `RAYTACE_OBSERVER_MODEL` (recap),
239
461
  `RAYTACE_ATTRIBUTION_MODEL` (Chain of thought) or `RAYTACE_SUMMARY_MODEL`
240
462
  (summaries) in `~/.raytrace/config.env`, then `raytrace stop && raytrace start`.
241
- - **Optional, Jev ranking:** `raytrace key typesafe` adds a
242
- [TypeSafe](https://typesafe.ai) key, which ranks Chain of thought's reasons
243
- and rates how severe each command was. Without it the reasons are listed
244
- unranked and severity comes from rules.
463
+ - **Optional:** `raytrace key typesafe` adds a [TypeSafe](https://typesafe.ai)
464
+ key, which ranks Chain of thought's reasons and rates how severe each command
465
+ was.
245
466
  - `raytrace key openrouter --remove` removes a key.
246
467
 
468
+ ---
469
+
247
470
  ## Commands
248
471
 
249
472
  | Command | What it does |
250
473
  |---|---|
251
- | `raytrace sandbox create` | upload this Git repository to a new cloud sandbox; `--name <name>` |
252
- | `raytrace connect [id] [--claude]` | open a terminal in a sandbox, signing in first if needed (also `raytrace sandbox shell [id]`); `--claude` starts Claude Code in it |
253
- | `raytrace sandbox list` | your cloud sandboxes |
254
- | `raytrace sandbox start\|stop [id]` | start or stop a sandbox; stopping keeps its files |
255
- | `raytrace sandbox destroy [id]` | delete a sandbox; its recorded sessions are kept |
256
- | `raytrace auth login` | sign in to RayTrace; `status`, `logout` |
257
- | `raytrace mcp` | MCP server on stdio for your editor's agent; see [Use from your editor](#use-from-your-editor-mcp) |
258
- | `raytrace --code <code>` | beta invite: redeem a code RayTrace gave you (signed in first) for one $10-credit sandbox; codes are single-use, are deleted on redemption, and expire after 3 days, as does the credit |
259
- | `raytrace sandbox create --local [--name <name>]` | the same sandbox in a Linux VM on this machine; offers to download Lima if needed (`--yes` skips the question) |
260
- | `raytrace sandbox list --local` | your local sandboxes; their names work with `connect`, `start`, `stop` and `destroy` |
261
- | `raytrace sandbox destroy <name> [--delete-logs \| --keep-logs]` | delete a local sandbox; asks whether its captured logs go too, or move to `~/.raytrace/archive` |
262
- | `raytrace export <trace-id> [--format json\|markdown] [--output <file>]` | export a recorded trace to terminal or owner-only file without running the proxy |
263
- | `raytrace doctor` | what this machine has and lacks, local sandboxes included |
264
- | `raytrace key [openrouter\|typesafe] [--remove]` | your keys for the dashboard's AI features; asked for, never taken as an argument |
474
+ | `raytrace mcp` | the MCP server for your editor; see [Set up in your editor](#set-up-in-your-editor-mcp) |
475
+ | `raytrace sandbox create [--local] [--name <name>]` | copy this Git repository into a new sandbox, in the cloud or (`--local`) on this machine |
476
+ | `raytrace connect [id or name] [--claude \| --codex]` | open a terminal in a sandbox, optionally with an agent running in it |
477
+ | `raytrace sandbox list [--local]` | your sandboxes |
478
+ | `raytrace sandbox start\|stop <id or name>` | start or stop one; stopping keeps its files |
479
+ | `raytrace sandbox destroy <id or name>` | delete one. Cloud: `--keep-traces` (paid plans). Local: `--delete-logs` or `--keep-logs` |
480
+ | `raytrace open` | open the local dashboard |
481
+ | `raytrace auth login\|status\|logout` | your RayTrace sign-in, for cloud sandboxes |
482
+ | `raytrace upload logs [--sandbox <name>]` | send a local sandbox's recorded logs to the cloud dashboard; `raytrace upload status` shows your storage |
483
+ | `raytrace share <trace-id> [--fork]` | a time-limited link to one recorded prompt; `--list`, `--revoke <share-id>` |
484
+ | `raytrace export <trace-id> [--format json\|markdown] [--output <file>]` | export a recorded prompt to the terminal or a file, even with RayTrace stopped |
485
+ | `raytrace --code <code>` | redeem a beta invite code |
486
+ | `raytrace key [openrouter\|typesafe] [--remove]` | your keys for the dashboard's AI features |
487
+ | `raytrace doctor` | what this machine has and lacks |
488
+
489
+ `raytrace help` lists everything.
490
+
491
+ ---
265
492
 
266
493
  ## Beta invites
267
494
 
268
- If RayTrace gave you a beta code, sign in first, redeem it, then create your
269
- sandbox — in that order:
495
+ If RayTrace gave you a beta code, sign in, redeem it, then create your sandbox:
270
496
 
271
497
  ```sh
272
498
  raytrace auth login
273
- raytrace --code <code> # also: raytrace code <code>
499
+ raytrace --code <code>
274
500
  raytrace sandbox create
275
501
  ```
276
502
 
277
- Redeeming deletes the code on RayTrace's servers; it can never be used
278
- again, by anyone. Codes expire 3 days after they are issued, and the $10 of
279
- OpenRouter credit expires 3 days after you redeem it, so do not sit on
280
- either. Your account shows as **Beta** in the cloud dashboard until the
281
- credit ends, and the credited sandbox is tagged Beta there too. Connecting
282
- to a credited sandbox after its 3 days are up warns you that model calls
283
- will be refused; the sandbox itself still opens.
284
-
285
- Codes are minted only from the backend repo (`raytrace`:
286
- `python3 worker/gvisor/mint_beta_codes.py`, 10 at a time); this CLI never
287
- generates them.
288
-
289
- ## Exporting traces
290
-
291
- Export a recorded session directly from local evidence, even when RayTrace and the VM are stopped:
503
+ The code gives you one sandbox with $10 of model credit. Codes are single-use
504
+ and expire 3 days after they're issued, and the credit expires 3 days after you
505
+ redeem it. Your account and that sandbox show as **Beta** in the cloud dashboard
506
+ until then.
292
507
 
293
- ```sh
294
- # View trace in terminal as Markdown
295
- raytrace export <trace-id>
296
-
297
- # Export structured JSON
298
- raytrace export <trace-id> --format json
299
-
300
- # Save report to a file with owner-only (0600) permissions
301
- raytrace export <trace-id> --format markdown --output trace.md
302
- ```
508
+ ## Privacy
303
509
 
304
- Exported traces contain the full turn prompt, answer, tool calls, exit codes, and observed sandbox execution. Output files refuse to overwrite existing files to prevent accidental data loss.
510
+ - **Local sandboxes** keep everything on your machine, in `~/.raytrace`, readable
511
+ only by you. The local dashboard's API needs the token in
512
+ `~/.raytrace/api-token`, so other accounts on the machine can't read your
513
+ traces. `raytrace open` signs your browser in with a one-time link.
514
+ - **Cloud sandboxes** upload your project ([what is uploaded](#what-is-uploaded))
515
+ and record prompts, model requests and answers, tool calls and commands on
516
+ RayTrace's servers. Members of your organization can see them; other
517
+ organizations can't.
518
+ - **Your sign-in** is kept in the macOS Keychain or the Linux secret service (or a
519
+ file only you can read where neither exists). `raytrace auth logout` removes
520
+ it. Cloud commands ask you to sign in again after 2 days without cloud use.
305
521
 
306
- ## Privacy
522
+ ## Troubleshooting
307
523
 
308
- Local sandboxes keep everything on your machine. Cloud sandboxes run on
309
- RayTrace's servers.
310
-
311
- - `raytrace sandbox create` uploads your project (see
312
- [what is uploaded](#cloud-sandboxes-preview)) to RayTrace.
313
- - Inside a sandbox, the prompts, model requests and answers, tool calls and the
314
- commands that run are recorded on RayTrace's servers for your organization.
315
- Members of your organization can see them at app.raytracer.si; other
316
- organizations cannot.
317
- - `raytrace auth login` keeps your sign-in in the macOS Keychain or the Linux
318
- secret service (a file readable only by you where neither is available), and
319
- `raytrace auth logout` removes it. Cloud commands ask you to sign in again
320
- after 2 days with no cloud use (any cloud command resets that clock); the
321
- command then continues where it left off. Local recording never asks.
322
- - What RayTrace records locally stays in `~/.raytrace`, readable only by you.
323
- Its local API takes the token in `~/.raytrace/api-token`, so another account
324
- on the machine cannot read your traces or spend your OpenRouter key through
325
- it. `raytrace open` signs your browser in with a one-time link.
524
+ - **The MCP server doesn't show up in my editor:** restart the editor after
525
+ adding it. In Claude Code, `claude mcp list` shows whether it's connected.
526
+ Check that `node --version` is 22.13 or newer.
527
+ - **No terminal opened after "connect":** the agent's reply has the command to
528
+ paste, such as `raytrace connect my-box --claude`. On macOS, allow your editor
529
+ to control your terminal app in **System Settings → Privacy & Security →
530
+ Automation**.
531
+ - **The first local sandbox is taking long:** setting up the VM takes a few
532
+ minutes. Ask the agent for the sandbox status, or read
533
+ `~/.raytrace/logs/mcp-create-<name>-*.log`. The whole VM log is in
534
+ `~/.raytrace/logs/sandbox-vm.log`.
535
+ - **`sandbox create --local` says the machine isn't ready:** each line says
536
+ what's missing and how to fix it; `raytrace doctor` shows the same. Port 8798
537
+ in use usually means another Lima VM is running (`limactl list`).
538
+ - **A local sandbox's sessions don't show in the dashboard:** restart RayTrace
539
+ with `raytrace stop && raytrace start`.
540
+ - **The dashboard says this browser isn't signed in:** run `raytrace open`.
541
+ - **`Cannot reach RayTrace at https://api.raytracer.si`:** check your
542
+ connection. Networks that inspect HTTPS, such as some company Wi-Fi, can block
543
+ it.
544
+ - **A sandbox isn't found:** `raytrace auth status` shows which account you're
545
+ signed in as. Sandboxes belong to the account that made them.
326
546
 
327
547
  ## Uninstall
328
548
 
329
549
  ```sh
330
- raytrace sandbox destroy <sandbox-id> # any sandboxes you no longer need
550
+ raytrace sandbox destroy <id or name> # any sandboxes you no longer need
551
+ raytrace uninstall --purge # local sandboxes: deletes the VM and ~/.raytrace
331
552
  raytrace auth logout
332
- npm uninstall -g @raytrace-cli/cli
553
+ npm uninstall -g @raytrace-cli/cli # or: pip uninstall raytrace
554
+ claude mcp remove raytrace -s user # if you added the MCP server to Claude Code
333
555
  ```
334
556
 
335
- Upgrading from 0.4 or earlier: the first start of the new version upgrades
336
- `~/.raytrace/evidence.db` in place (your recorded sessions are kept), and older
337
- versions cannot open it afterwards.
338
-
339
- With local sandboxes, run `raytrace uninstall --purge` before removing the
340
- package: it deletes the local sandbox VM and everything in `~/.raytrace`
341
- (recorded sessions, archived logs, and the Lima RayTrace downloaded). Without
342
- `--purge`, remove the VM yourself with `limactl delete --force raytrace`.
343
-
344
- If you set up local recording with an earlier version, run
345
- `raytrace uninstall` before removing the package so Claude Code is not left
346
- with a hook that points at a missing command.
347
-
348
- ## Troubleshooting
349
-
350
- - **`Cannot reach RayTrace at https://api.raytracer.si`:** check your
351
- connection. Networks that inspect HTTPS, such as some company Wi-Fi, can
352
- block it; try another network.
353
- - **Sign-in or sandbox creation fails:** run `raytrace auth status`, and
354
- `raytrace auth login` again if needed. Create the sandbox from inside a Git
355
- repository.
356
- - **A local sandbox's Claude Code sessions do not show in the dashboard:**
357
- RayTrace's proxy may be from before local sandboxes. Restart it:
358
- `raytrace stop && raytrace start`. `sandbox create --local` warns about this.
359
- - **The dashboard says this browser is not signed in:** run `raytrace open`.
360
- Each browser signs in once, for 30 days; a bookmark to the dashboard then
361
- keeps working.
362
- - **`sandbox create --local` says the machine is not ready:** each line names
363
- what is missing and how to fix it; `raytrace doctor` shows the same. Port
364
- 8798 in use usually means another Lima VM is running (`limactl list`).
365
- - **The VM fails to start or set up:** the last lines are shown; the whole
366
- log is in `~/.raytrace/logs/sandbox-vm.log`.
367
- - **`raytrace connect` asks for a sandbox id:** run `raytrace sandbox list` and
368
- pass the one you want. The id is optional only when you have one sandbox.
557
+ Without `--purge`, remove the VM yourself with `limactl delete --force raytrace`.
369
558
 
370
559
  ## Developing
371
560
 
372
561
  ```sh
373
562
  npm install
374
- npm run build # dashboard -> dist/dashboard
375
- npm run dashboard:dev # dashboard with hot reload, API from a running RayTrace
563
+ npm run build # dashboard -> dist/dashboard
564
+ npm run dashboard:dev # dashboard with hot reload, API from a running RayTrace
376
565
  npm run typecheck
566
+ npm test
377
567
  node bin/raytrace.mjs <command> # run the CLI from this folder
378
- npm pack # build the package as it would be published
568
+ ```
569
+
570
+ To use your checkout as the MCP server in Claude Code:
571
+
572
+ ```sh
573
+ claude mcp add --scope user raytrace -- node /path/to/raytrace-cli/bin/raytrace.mjs mcp
379
574
  ```
380
575
 
381
576
  To try it without touching your real setup, give it its own home and port:
@@ -385,6 +580,20 @@ mkdir -p /tmp/rt && echo RAYTACE_PORT=18797 > /tmp/rt/config.env
385
580
  RAYTRACE_HOME=/tmp/rt node bin/raytrace.mjs setup --no-claude-code
386
581
  ```
387
582
 
583
+ ### Publishing to pip
584
+
585
+ The pip package is the npm package plus an official Node.js build, one wheel per
586
+ platform. After `npm publish`, build the same version's wheels and upload them:
587
+
588
+ ```sh
589
+ python3 python/build_wheels.py # all six platforms, into python/dist/
590
+ twine upload python/dist/*.whl
591
+ ```
592
+
593
+ The *pip wheels* workflow builds the same wheels on every `v*` tag and installs
594
+ them on Linux, macOS and Windows (x64 and ARM); its `wheels` artifact can be
595
+ uploaded instead. The Node.js version is `NODE_VERSION` in `python/build_wheels.py`.
596
+
388
597
  ## License
389
598
 
390
599
  MIT