Execute
Another machine. A familiar command.
Use the target’s own system, directories and toolchain. Exit codes return unchanged, and --json gives agents structured results.
Cross-device execution for developers and AI agents
Run tests and builds on your own Macs, Windows PCs and Linux machines. Logs and files come back, exit codes stay exact, and long jobs keep running when you disconnect.
Works with any agent that can run a CLI
macbookdevboxRuns in the project already set up on Linux
xrun devbox -C /home/dev/app -- cargo testrunning 128 tests
test result: ok. 128 passed; 0 failed
exit 0How it works
Build on Windows, test on Linux, or leave a long job running on another machine. Pick a scenario to replay it.
The build runs on desktop, then app.exe comes back to devbox, SHA-256 verified.
Illustrative workflow · not a live connectionExample targets already have the project and toolchain installed.
Built for real work
Execute, check jobs, read logs and bring files back with the same CLI.
Execute
Use the target’s own system, directories and toolchain. Exit codes return unchanged, and --json gives agents structured results.
Recover
Reliable jobs, logs and results stay on the target. When the caller reconnects, it queries the original job and picks up the result.
Retrieve
Pull builds, reports and screenshots, or push an edited file back. Transfers are SHA-256 verified, have no fixed size limit and resume within 24 hours.
Open a dev server from another machine in your local browser.
xrun devbox forward 8080:3000Capture a target’s display as PNG, JPEG or WebP for an agent to inspect.
xrun macbook screenshot ./screen.pngPipe stdin and stdout in real time, for example to stream a directory as tar.
xrun devbox -i -C /repo -- tar -cf - dist > dist.tarOn the same network, devices connect directly and fall back to the relay.
xrun network direct 192.168.1.10Request IDs, JSON results and defined exit codes let agents retry without running a job twice.
xrun devbox jobs --request-id <id> --jsonxrun help and xrun doc work with no network. Add --lang zh for Chinese.
xrun doc automationSecurity
The relay only forwards ciphertext, and every device decides for itself who may use it.
Devices talk over mutual TLS inside the relay tunnel. The relay cannot read commands, output, files or screenshots.
Joining a network grants nothing. A target allows specific source devices, and commands run as its current user.
Devices dial out to a relay you deploy in your own Cloudflare account or on your own Linux server.
The manager signs the device roster and renews its lease. Revoked devices lose access.
Get started
Install xrun on both, deploy a relay, then create a network and invite the second machine. Each step says where to run it.
On macbook, or on a Linux server
Cloudflare
xrun relay deploy --provider cloudflare --name xrun-relayLinux server
xrun relay deploy --provider local --addr <server-ip>:9528Cloudflare opens your browser to authorize. Both print a deployment link for the next step.
On macbook
xrun connect '<deployment link>' --name macbookmacbook becomes the manager. Keep it online: it renews the signed device roster.
macbook, then devbox
macbook
xrun invitedevbox
xrun connect relay.example.com K7M4-P9Q2 --name devbox --allow-managerUse the address and access code that invite prints. Codes are single-use and expire in 10 minutes.
On macbook
xrun devbox -- uname -sLinuxLinux answers. You’re connected.
Prefer an app? On macOS and Windows, New network deploys a Cloudflare relay and creates the network in one flow.
Read the full quick startAfter installing, xrun doc opens the complete manual offline.
Before you start
No. Any agent that can run a CLI on its machine can use xrun. Install xrun on both ends, join the network and allow access on the target. Cloud environments must permit installing and running commands.
To source device identities. Programs that can use the same identity share its access, and commands run as the target’s current user. Network membership alone grants nothing.
Yes. The manager renews the signed roster on a lease, 15 minutes by default and up to 24 hours. If it stays offline past the lease, new remote operations return ROSTER_EXPIRED until it is back. Accepted jobs keep running.
Accepted reliable jobs keep running; reconnect to query their logs and results. Pausing access closes sessions; cancel a job with kill. Streaming runs and port forwards end with their connection, and stopping the target’s service cancels its running jobs.
push and pull move one file at a time, SHA-256 verified, with no fixed size limit. Interrupted transfers can resume within 24 hours. For a directory, stream a tar archive with -i, or sync code with Git.
On macOS and Windows, the app manages networks, access, the background service and activity, and can run commands, transfer files and take screenshots too. Its New network flow deploys a Cloudflare relay for you. Linux uses the CLI.
SSH needs a reachable port or a VPN, keys on every host and a live session. With xrun, devices only dial out to your relay, each target chooses who may connect, accepted jobs survive disconnects, files come back verified and results are available as JSON. Windows needs no OpenSSH setup.
Open source under MIT. Your relay, your devices, your rules.