box

Set up box in one line

Your coding agent runs its iOS work on a real Mac through box: builds, tests, LLDB breakpoints and a simulator you can watch live, started from Linux, WSL or a cloud sandbox.

Your first GitHub sign-in adds $10 of credit, 200 minutes of build and test time. Prepaid, no subscription.

With a coding agent

Paste this into Claude Code, Codex or Cursor

Set up box with https://xenoci.com/setup

Run claude in your app folder and paste the line at the prompt.

Or install the plugin: claude plugin marketplace add Xeno-CI/box-cli, then claude plugin install box@xenoci

Run codex in your app folder, or open Codex in your editor, and paste the line.

Or install the skill plugin: codex plugin marketplace add Xeno-CI/box-cli, then codex plugin add box@xenoci

Open your app folder, press Cmd I (Ctrl I on Linux and Windows) for the Agent panel, and paste the line.

Or add the MCP server: npx -y @xenoci/box mcp

Your agent installs box and gives you a link to sign in with GitHub. $10 of credit to start, prepaid

On a phone? Open this on the computer where your agent runs.

Just the skill

For Claude Code, Codex, Cursor, Gemini CLI and OpenCode. If the box CLI is missing, the skill tells your agent how to install it.

terminal
npx skills add Xeno-CI/box-cli

No agent, or macOS CI minutes adding up

Run the same jobs from your own terminal with Node 18 or later. Tests and a picture of the app come back in one Mac job.

terminal
npx -y @xenoci/box login
npx -y @xenoci/box test --screenshot      # in the folder with the .xcodeproj

Without Node: curl -fsSL https://xenoci.com/install.sh | sh puts box in ~/.local/bin without sudo and checks it against SHA256SUMS. Read the script first.

what you see
$ box test --screenshot
box: checked 3 files
box: sync: 3 files, 0 new (0 bytes), snapshot snap_bavXbOuveVA3Ph3J
box: job bj_yuYzWnu-XY0_-m7p (test, ios, $0.05/min) submitted
box: status: queued
box: status: running
  … the Xcode build and test log streams here …
box: status: succeeded
box: tests 1 passed, 0 failed
box: saved ./.box/out/bj_yuYzWnu-XY0_-m7p/screen.png
box: bj_yuYzWnu-XY0_-m7p succeeded, 180s billed, $0.15
The screen.png a box job saved: a habit tracker app on the iOS Simulator

box costs $0.05 per started minute of build and test time. A standard GitHub-hosted macOS runner costs $0.062 per minute (GitHub's runner pricing).

Agent runbook

If you are the agent that was handed this page, work through the six steps from top to bottom and close with the report in step 6. The pasted line is the user's consent to install. The installer runs without sudo, writes nothing outside ~/.local/bin/box and ~/.config/box/, and verifies the download against the server's SHA256SUMS.

  • Secrets stay out of the conversation and out of the repository. Do not request a token, a code or a password, and do not save one in the project.
  • Money is the user's call. Do not top up and do not pay for them.

1 Get the CLI

Runs on Linux (x86_64 and arm64), WSL, and macOS on Apple silicon. Native Windows and Intel Macs are not supported.

terminal
command -v box >/dev/null 2>&1 || curl -fsSL https://xenoci.com/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
box --version

The last line prints the version that was installed.

2 Sign the user in with GitHub

Run box status. If the output has a login line and a balance, this machine is signed in already and you can move on to step 3.

If it does not, run box login --no-browser. It prints a GitHub address and a one-time code and returns at once. Send the user both in one message, then run box login --wait right away without waiting for a reply. On GitHub they enter the code and approve; box login --wait notices that by itself and answers box: signed in as <login>, so the user never has to tell you they are done. The approval tells box which account they are and nothing more: no repository or organization access. A first sign-in also adds $10 of credit.

box login --wait waits about 2 minutes at a time, under the limit many agent shells have. If it says the code is still good, run it again without messaging the user. If it says the code expired, start this step over for a new link. Finish with box status, which should exit 0 and list the login and the balance. Through MCP, the login tool does the same: call it once for the link, then again with wait_seconds until it says signed_in.

  • Cloud agents. Cursor background agents, Codex cloud and Claude Code on the web begin every session signed out. The user can fix that once, in the settings of the agent's environment: store a BOX_TOKEN secret there and add step 1's install command to the setup script. Leave the token value out of the conversation.
  • A low balance. When box status prints a low line (normally under $1, about 20 Mac minutes; the line decides, not your own sense of enough) or a job stops with exit 3 and an empty balance, ask the user once: “box has $x left. Shall I make a top-up link?” Money is their decision: never top up by yourself, and do not ask again. If they say yes, run box topup --print, give them the address, then run box topup --wait, again each time it says the balance has not gone up yet; it returns when the balance goes up and you carry on. If they say no, carry on with what the balance allows.

3 Connect your agents

any folder
box setup

This sets box up for the user, once per machine, for every project: the box skill for Claude Code (~/.claude/skills/box/) and Codex (~/.agents/skills/box/), a short marked box section in ~/.claude/CLAUDE.md and ~/.codex/AGENTS.md (their other text is kept), and the MCP server for both. It writes nothing into the project, and running it again changes nothing. Then go to the top folder of the iOS project, the one that holds the .xcodeproj, .xcworkspace or project.yml, and add .box/ to .gitignore, because job results are saved there. Cursor has no file for user-wide rules: for Cursor, or when the user wants the notes committed for their team, run box setup --project there.

4 Check the MCP server

box setup already registered it. Check it for the agent you are running as; do not add it again.

project root
claude mcp get box      # Claude Code
codex mcp get box       # Codex

The server provides these tools:

build test screenshot run debug exec describe find tap type swipe press_button look stop report_problem report_job claims status logs usage login topup

They load the next time the agent starts. For the rest of this session, call the CLI.

Or install the plugin (skill and MCP server together): claude plugin marketplace add Xeno-CI/box-cli then claude plugin install box@xenoci; any other MCP client can run npx -y @xenoci/box mcp. See github.com/Xeno-CI/box-cli.

5 Run a first build

project root
box build --dry-run     # list the files a build would upload, and stop there
box build               # compile on the Mac
box test --screenshot out.png   # tests, then a picture, in one Mac job
box screenshot out.png  # a picture alone
box run --detach        # start the app, print a job id and a live view link
box ui describe         # one short line per element: role, label, value, ref
box ui find --text "Sign in"
box ui tap --id <ref>
box stop

A .box/setup script at the project root runs on the build machine before box build, box test and box run, once until its contents change. If it fails, the build does not start and the job exits 1 with the script's own output. Use it for framework downloads and .xcconfig copies, never for secrets. The dry run says box: setup would run or box: setup would be skipped (unchanged).

Begin with the dry run. If the user also asked for tests or a picture, go straight to box test --screenshot out.png without a plain box build first: every job builds and reports compile errors the same way, so a separate build only adds a Mac job. The lines after that are what an agent usually needs next.

When a job fails, its last line is box: details: .box/out/<job>/why.txt. Read that file and the .box/out/<job>/why-*.png pictures first: they are what only the Mac has, crash stacks with symbols, failing tests with file:line and the screen at the moment of the failure. test.log and test.xcresult.zip sit next to them.

6 Do the rest of the task, then report

If the user asked for more than setup in the same message (“then build and screenshot the app”), do it now with box, without asking first. Then end with: box is installed, the GitHub login that is signed in, the balance from box status, the job ids and results, and one line saying box was set up for every project on this machine in ~/.claude and ~/.codex, with nothing added to the repository.

Android

For an Android app, add --platform android to any job command, for example box build --platform android. The steps above stay the same.

  • Every job command takes --platform ios or --platform android, and so does every MCP job tool (platform).
  • Without it, box looks at the project folder: an Xcode project, project.yml, Package.swift or an ios/ folder means iOS; settings.gradle, gradlew or an android/ folder means Android.
  • When both are there (Flutter, React Native, Expo), box picks neither and exits 2 asking for --platform, so no job runs on the platform you did not mean.
  • To fix the choice for a project, put platform = "android" (or "ios") in .box.toml. --platform still wins.
  • Android has one size: 4 vCPU / 16 GB. It runs on a Linux Android emulator, and the emulator boot time is not billed.
  • --xcode is for iOS only; with --platform android it exits 2.
  • box debug and box build --device-build are iOS only and exit 2 on Android. box test runs every unit test (Gradle testDebugUnitTest), so --only-testing is not used.
  • The debug APK is saved as .box/out/<job>/app-debug.apk. The Gradle cache stays between jobs of the same project, so the next build is incremental.
box build --platform android            # app-debug.apk in .box/out/<job>/
box test --platform android
box screenshot --platform android out.png
box run --platform android
box ui tap --label "Sign in"             # also describe, type, swipe, button home
box exec --platform android -- ./gradlew tasks
box purge --platform android --yes

Android costs $0.02 per minute on the one Android size (4 vCPU / 16 GB), from the same US dollar balance as the Mac. The emulator boot time is free. The current rate is at xenoci.com/api/v1/pricing, and every job prints its rate when it is submitted.

Debug, watch and record

Breakpoints with LLDB

box debug --break File.swift:42 --print count starts the app under LLDB on the Mac. At every stop it prints the stack and the variables.

  • Up to 10 --break points, each a file:line or a function name.
  • --stops sets how many stops to report, 20 at most.
  • --tap-label or --tap-id presses a button first, for code that only runs after a tap.
  • Over MCP it is the debug tool.
debug output
$ box debug --break BoxDemoApp.swift:22 --tap-id add
debug: attached to com.xenoci.box.BoxDemo
breakpoint 1: BoxDemoApp.swift:22
== stop 1: thread 1, breakpoint 1.1
  #0 ContentView.add(_:) at BoxDemoApp.swift:22
  #1 closure #2 in closure #1 in ContentView.body.getter at BoxDemoApp.swift:15
variables:
before (Swift.Int) = 0
step (Swift.Int) = 3
label (Swift.String) = "added 3"
box: bj_fxXzCejnrvbFLA5B succeeded, 180s billed

A live view of the simulator

box run compiles the app and boots it in a simulator that stays up afterwards. An agent should always pass --detach. Without it the command stays attached and streams the log until the session is over. With it the command returns a job id and a live view link.

Pass that link to the user. It opens only for their GitHub account, and on the page they can tap, swipe and type in the app.

The agent drives the same session with box ui: describe, screen out.png, tap --id, tap --label, tap X Y, swipe, type and button home. The MCP tools do the same.

A session closes in one of four ways: box stop, another build, test, run or debug of the same project, 10 minutes with no change on screen, or 30 minutes in total.

Why a job failed, and did the screen change

A failed build or test ends with one line, box: ai: File.swift:42: the cause; fix: the direction, read by an AI model from what only the Mac has: the log tail, failing tests with their locations and crash stacks symbolicated with the build's dSYM. box why prints the full where, why and fix for the last job, or box why <job>.

box screenshot --compare last compares the screen with this project's last succeeded screenshot. It saves a diff picture per changed screen in .box/out/<job>/compare/ and prints one line saying whether the change looks intended or broken.

  • Over MCP these are the why tool and screenshot with compare: true.
  • Tokens, keys, passwords and user folder paths are masked before anything is sent. Source files and environment values are not sent. The models (Microsoft Azure, Anthropic as the fallback) do not train on it. See terms 6-1.
  • box ai off turns both off for the account: nothing goes to a model, and --compare still saves its diff pictures. box ai on turns them back on.

Video, dark mode and languages

box screenshot --record out.png takes the screenshot and also saves the run as screen.mp4.

--dark turns on dark mode and --locale ko_KR sets the language. ja, ar and the rest work the same way, and ar and he lay the app out right to left. Both options work with screenshot, run and ui. The language only changes when the app ships it.

Pricing

$0.05 per minute of build and test time, every started minute. Prepaid in US dollars, with no subscription and no daily limit.

RoundingEach job is rounded up to the minute. 1 to 60 seconds on the Mac is one minute ($0.05), 61 to 120 seconds is two ($0.10).
FreeUploading, time in the queue and starting the Mac.
Failure on our side$0 for that job.
Sign-up credit$10, once per account. That is 200 minutes, to use within 14 days.
Balance capOne account holds $300 at most.
Android$0.02 per minute on the one Android size (4 vCPU / 16 GB), rounded the same way and paid from the same balance. The emulator boot time is free. Rate: xenoci.com/api/v1/pricing.

box status prints what is left. box usage --csv lists every job and box balance --csv every balance change. box topup opens the top-up page.

Platform support

Native iOSXcode projects and workspaces. Swift, SwiftUI, UIKit and Objective-C. Swift Package Manager and XcodeGen.
With a setup commandCocoaPods, Tuist, fastlane, Flutter, React Native and Expo. Run the tool's own setup through box exec before building. Each of these was built and launched on a simulator.
AndroidGradle projects, and the Android side of Flutter, React Native and Expo, with --platform android. See Android.
TargetsThe iOS simulator on Xcode 27.2, the one version installed, and unsigned builds for real iPhones (build --device-build).
Not yetNative Windows, Intel Macs, choosing the Xcode or iOS version, physical iPhones, signing or TestFlight upload done for you, Kotlin Multiplatform, Capacitor, .NET MAUI, and team or organization accounts.

Commands

Jobs and output

box logsFollows the last job again.
box cancelStops the last job.
box jobsLists recent jobs.
box test --only-testing Target/Class/testRuns only the tests you name.
box test --screenshot out.pngRuns the tests, then launches the app and saves a picture, in the same Mac job.
--jsonPrints one JSON event per line. The last one is a result with billed_seconds.

Exit codes

0Success.
1A compile error or a failing test. Every error comes as file:line:col with your local path and the lines around it. Fix the code and run the command again.
2The command was called the wrong way, or the local machine is at fault.
3The account or box itself: signed out, an empty balance or a Mac fault. The message names the cause. Tell the user instead of retrying.
130The job was cancelled.

Worktrees and project names

The Mac keeps one code copy and one build cache per project name. The name is the folder name unless you pass --project NAME, so two git worktrees do not overwrite each other.

Builds for a real iPhone

box build --device-build compiles a Release build and leaves it unsigned. You get device-build.zip in .box/out/<job>/. Signing and uploading happen on your own machine, so signing keys stay off box. Over MCP, the build tool takes device_build: true.

Steps that run on the Mac

A project.yml makes box run xcodegen generate by itself. For any other step, such as pod install, flutter build ios or a code generator, use box exec -- <command>. It runs in the project folder on the Mac, and whatever it produces is still there for the next build.

A folder with no app project at its top (a Rust crate, a Tauri app's root, a script) is refused before anything is uploaded or billed. Run its own tool with box exec, for example box exec -- cargo build, or name the Xcode project inside it with box build --workspace path/App.xcodeproj. Rust and Bun are not on the Mac image: install them in the same command, as in box exec -- 'curl -fsSL https://sh.rustup.rs | sh -s -- -y && . ~/.cargo/env && cargo build'. node_modules is never uploaded, so run npm ci or bun install in the same box exec as the build that needs it.

Code and data

A job syncs your project folder to a Mac and builds it there. The CLI prints one line per step:

  1. Upload box checks every file and sends only the new or changed ones. .gitignore is respected and .env is never sent
    box: upload: 70 files checked, 3 new (12 KB), .gitignore respected, .env never sent
  2. Mac The job waits for a free Mac (not billed), which unpacks your source next to the project's previous build
    box: machine: source unpacked
  3. Build xcodebuild compiles only what changed since that build
    box: build: done in 41s
  4. Test Your tests run on a simulator and are counted
    box: tests 3 passed, 0 failed
  5. Results Logs, the result bundle and screenshots come back to .box/out/<job>/, and the last line says what it cost
    box: bj_… succeeded, 120s billed, $0.10
UploadedThe project folder, minus whatever .gitignore and .boxignore exclude. After the first sync, only files whose contents changed.
Never uploaded.env files (.env.example is uploaded), .git, .box, node_modules, Pods, .build and DerivedData.
Check firstbox build --dry-run prints every file a build would upload.
Kept on the MacThe code copy and its build cache, between jobs, so later builds start warm.
DeletedA project idle for 7 days. box purge --yes deletes this project's workspace on the Mac immediately. Neither one changes the files on your machine.
Returned to youLogs, screenshots, videos and zips, in .box/out/<job>/. We keep job logs and results for 7 days.

Failure reports

When a command fails, the CLI sends the box team a short report: the command, the exit code, step timings, the box version, the OS and CPU, our error code and message, and the job id. Paths, addresses, tokens and e-mail addresses are stripped from the message before it leaves. Your code, file contents and environment values are never part of it.

To switch it off, run box telemetry off or set BOX_TELEMETRY=0 or DO_NOT_TRACK=1.

Contact

Run box feedback "what went wrong". The message goes to the people who run box, with your last job attached. MCP agents call report_problem instead. A job that failed on our side ends with box: looks like our side: run box report bj_… --reason "..." (MCP report_job); box claims shows the result. What a failure on our side costs follows the terms. You can also write to play@xenoci.com.

Docs for people are at xenoci.com/docs, and service status is at xenoci.com/status.