Skip to content

Commit f533a2a

Browse files
feat: add sandbox remote-run (rr)
Adds `langsmith sandbox remote-run` (alias `rr`): mirror the current git worktree into a LangSmith sandbox and run a command there. It creates or starts a deterministic per-user sandbox, provisions SSH/rsync inside it, syncs committed (HEAD) plus uncommitted local changes, and runs the command from the mirrored checkout. Supports named sandboxes, snapshot selection, opt-in secrets sync, and port tunneling (`--tunnel` forwards every port in `.env.ports.override` to localhost while the command runs).
1 parent bf2566f commit f533a2a

5 files changed

Lines changed: 1090 additions & 1 deletion

File tree

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,21 @@ Identifiers use `[OWNER/]REPO` format. Omitting owner defaults to `-` (the API's
309309

310310
Push excludes `.git/`, `node_modules/`, `__pycache__/`, `.venv/`, `dist/`, `build/`, `target/`, `.next/`, `.cache/`, plus `.env*` files, common secret extensions (`.pem`, `.key`, `.pfx`, `.p12`, `.crt`), and rejects binary or oversize (>1 MiB) files. Pull wipes the destination dir before writing; non-empty directories without a `SKILL.md`/`AGENTS.md` marker require `--yes`.
311311

312+
### `sandbox remote-run` — Run local repo commands in a sandbox
313+
314+
```bash
315+
# Mirror the current git worktree into a deterministic sandbox and run a command
316+
langsmith sandbox rr -- make lint
317+
318+
# Reuse a named sandbox, or choose a snapshot for first-time creation
319+
langsmith sandbox rr --sandbox dev-alice --snapshot-id <id> -- pnpm install
320+
321+
# Forward ports from .env.ports.override while the remote command runs
322+
langsmith sandbox rr --tunnel -- make start
323+
```
324+
325+
`remote-run` (alias `rr`) creates or starts a LangSmith sandbox, provisions SSH/rsync inside it, syncs committed and uncommitted local git changes, and runs the command from the mirrored checkout. It requires local `git`, `ssh`, `rsync`, and GitHub CLI auth or `GH_TOKEN`/`GITHUB_TOKEN` for private GitHub repositories. SSH agent forwarding is off by default; pass `--forward-agent` to expose your local agent inside the box (e.g. for SSH-authenticated git).
326+
312327
### `self-update` — Update langsmith to the latest version
313328

314329
```bash

internal/cmd/sandbox.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Common workflows:
4949

5050
// Connectivity
5151
cmd.AddCommand(newSandboxExecCmd())
52+
cmd.AddCommand(newSandboxRemoteRunCmd())
5253
cmd.AddCommand(newSandboxConsoleCmd())
5354
cmd.AddCommand(sandboxServiceURLCommand.Cobra())
5455
cmd.AddCommand(newSandboxTunnelCmd())

0 commit comments

Comments
 (0)