> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xenoci.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Commands

> Every command and option of the box CLI

Every command of the XenoCI Box CLI, `box`, and its options, as `box --help` and `box <command> --help` print them for box 0.1.46. `box --version` prints the version you have

## Options every job command takes

`build`, `test`, `screenshot`, `run`, `debug`, `web`, `devices`, `exec`, `purge` and every `box ui` command

| option | what it does |
| - | - |
| `--path PATH` | The project folder (default: the current folder) |
| `--project NAME` | The project name on box (default: the folder name). Jobs of the same project share a workspace and build cache |
| `--platform ios\|android` | Which platform to run on (default: `.box.toml`, else what the folder holds) |
| `--xcode VERSION` | iOS only; exits 2 with `--platform android`. Picking a version is not available yet, see [Not available yet](https://docs.xenoci.com/reference/not-available-yet.md) |
| `--timeout MINUTES` | End the job after this many minutes, from 1 to 360 |
| `--detach` | Put the job in and print its id without following the log; `box logs` follows it later |
| `--json` | One JSON event per line instead of text, ending with a `result` that has `billed_seconds` |

`build`, `test`, `screenshot`, `run` and `debug` also take

| option | what it does |
| - | - |
| `--scheme NAME` | The Xcode scheme (default: the one box finds) |
| `--configuration NAME` | Debug or Release, or your own configuration |
| `--destination SPEC` | An xcodebuild destination instead of the default simulator |
| `--workspace PATH` | The `.xcworkspace` or `.xcodeproj` inside the project |
| `--dry-run` | List the files that would be sent and stop. No job, no charge |

`test`, `screenshot`, `run`, `debug` and every `box ui` command also take (`test` only `--device`)

| option | what it does |
| - | - |
| `--device NAME\|UDID` | A simulator from `box devices` (default iPhone 17 on the newest runtime); on Android an emulator profile |
| `--bundle-id ID` | The app to launch when box can not tell it from the project |
| `--dark` | Dark appearance (the same as `--appearance dark`) |
| `--appearance light\|dark` | Light (default) or dark |
| `--locale LANG` | The app language and region, for example `ko_KR`, `ja`, `ar` (right to left), `zh-Hans` |

What `--dry-run` printed for a small SwiftUI app

```text theme={"system"}
$ box build --dry-run
         7  .gitignore
       986  BoxDemo/BoxDemoApp.swift
       108  BoxDemoTests/BoxDemoTests.swift
       790  project.yml
       427  scripts/archive.sh
box: 5 files, 2318 bytes would be sent (only the changed ones are uploaded)
```

## Account

### `box login`

Sign in with your personal GitHub account. Prints a link, opens it in the browser and waits until you press Continue with GitHub

| option | what it does |
| - | - |
| `--no-browser` | Only print the link and return; run `box login --no-browser --wait` to wait for it |
| `--wait` | With `--no-browser`: stay until the sign-in finishes |
| `--timeout SECONDS` | Stop waiting after this many seconds (default 110, under the 2-minute limit many agent shells have). The same link stays good; run it again |
| `--token box_…` | Sign in with a token instead. `BOX_API_KEY` in the environment does the same |

### `box key create`

Make an API key for a place without a browser (CI, a cloud agent) and use it as `BOX_API_KEY`. Its value is shown only this once

| option | what it does |
| - | - |
| `--name NAME` | A name to tell keys apart, for example the CI it is for |

### `box key list`

Your API keys: ids and names, never the values

### `box key delete ID`

Delete an API key. Anything still using it stops working

### `box logout`

Forget the saved sign-in

### `box status`

Account, balance (and about how many build minutes it buys), held amount, minutes used today, running jobs and the last job

## Set up your agents

### `box setup`

Once per machine: the box skill for Claude Code and Codex, a short box section in `~/.claude/CLAUDE.md` and `~/.codex/AGENTS.md`, and the MCP server for both. Nothing is written into your project. See [Agents](https://docs.xenoci.com/agents.md)

| option | what it does |
| - | - |
| `--project` | Write into one repository instead (`CLAUDE.md`, `AGENTS.md`, skill files and `.cursor/rules/box.mdc`), to commit for a team or for Cursor |
| `--path PATH` | With `--project`: the repository folder (default: the current folder) |
| `--pre-push` | Add a git pre-push hook to this repository that runs `box test` and stops the push when the tests fail. Only this repository’s `.git/hooks`; no git config is changed |
| `--off` | With `--pre-push`: remove the hook again |

### `box mcp`

Run box as a local MCP server over stdio. `box setup` registers it; you rarely run it yourself

| option | what it does |
| - | - |
| `--path PATH` | The project folder the tools act on (default: the current folder) |

## Jobs

### `box build`

Build for the simulator. Takes the options above and

| option | what it does |
| - | - |
| `--device-build` | An unsigned Release build for a device, saved as `device-build.zip` (Android: `app-release-unsigned.apk` and `app-release.aab`) |

### `box test`

Build and run the tests on a fresh simulator. Takes the options above, `--device` and

| option | what it does |
| - | - |
| `--only-testing TEST` | Run one target, class or test, for example `AppTests/LoginTests` (iOS) |
| `--screenshot [OUT]` | After the tests, launch the app in the same job and save a picture (one Mac job instead of two). Default `.box/out/<job>/screen.png` |

### `box screenshot [OUT]`

Launch the app and save a picture (default `.box/out/<job>/`). Takes the options above, the app options and

| option | what it does |
| - | - |
| `--wait SECONDS` | Extra time after the screen settles before the picture |
| `--record` | Also save a video of the screen from launch to the picture (`screen.mp4`) |
| `--compare last` | Compare with this project’s last succeeded screenshot: a diff picture per changed screen and one line, intended or broken |

### `box run`

Build the app and keep it open on a simulator for `box ui`, until the next build, test, run or stop. Two folders run at once; a third waits. Takes the options above and the app options

### `box debug --break FILE:LINE`

Launch the app under LLDB, stop at breakpoints and print the stack and variables (iOS only; ends the open run session). Takes the options above, the app options and

| option | what it does |
| - | - |
| `-b, --break FILE:LINE\|FUNCTION` | A breakpoint, for example `ContentView.swift:42` or `increment`. Up to 10 |
| `-p, --print VAR` | A variable to show at each stop, for example `count` (default: all locals) |
| `--stops N` | How many breakpoint stops to record (default 1) |
| `--tap-id ID` | Tap this element after launch to reach the code |
| `--tap-label LABEL` | Tap the element with this label after launch |
| `--wait SECONDS` | How long to wait for a breakpoint (default 60) |

### `box web [URL]`

Open a page in Safari on a Mac and in Safari on an iPhone simulator: `safari-mac.png`, `safari-ios.png` and `web.json` with page errors and failed requests. Takes the common options and

| option | what it does |
| - | - |
| `--serve COMMAND` | Start your dev server on the Mac first (uploads this folder), for example `"npm run dev"`; URL is then a path on it (default `/`) |
| `--port PORT` | The port the `--serve` server listens on |
| `--width PIXELS` | Mac window width (default 1280) |
| `--dark` | Dark appearance on the iPhone simulator (Safari on the Mac stays light) |
| `--wait-for SELECTOR` | Wait until this CSS selector is on the page before the pictures |
| `--device NAME\|UDID` | The iPhone simulator (default iPhone 17) |

### `box devices`

List the simulators (iOS: name, runtime, udid) or emulator profiles (Android) that `--device` takes. A short job, billed like any other

### `box exec -- COMMAND`

Run one shell command in the project folder on the Mac (or the Android machine). Files it puts in `$BOX_OUT` or `box-out/` come back to `.box/out/<job>/`

### `box purge --yes`

Empty this project’s workspace on the selected platform (build cache and source copy). Nothing is removed without `--yes`

## Drive the running app

### `box ui describe`

The elements on screen, one line each: role, label, value and the ref `tap --id` takes

| option | what it does |
| - | - |
| `--tree` | Indent children under their parent instead of the flat list |

### `box ui find --text TEXT`

The one element whose label, value or ref contains TEXT

### `box ui tap`

Tap an element by `--id ID` or `--label LABEL`, or a point `X Y`

### `box ui type TEXT`

Type into the focused field

### `box ui swipe X1 Y1 X2 Y2`

Swipe from one point to another

### `box ui button NAME`

Press a hardware button: `home`, `lock`, `side` or `siri`

### `box ui screen [OUT]`

Save a picture of the screen now

## Follow and stop jobs

### `box jobs`

Your recent jobs, newest first

| option | what it does |
| - | - |
| `--limit N` | How many (default 10) |
| `--project NAME` | Only this project |

### `box logs [JOB]`

Follow a job’s output again (default: the last one)

| option | what it does |
| - | - |
| `--no-follow` | Print what is there and exit |

### `box results [JOB]`

Download a finished job’s results again into `.box/out/<job>/` (screen.png, logs, test results) without running it again (default: the last job). Also `box get`. Comes in the version after 0.1.46; 0.1.46 does not have it yet

| option | what it does |
| - | - |
| `--path PATH` | The project folder; the results land in its `.box/out/<job>/` (default: the current folder) |
| `--json` | Print JSON instead of text |

### `box stop [JOB]`

Stop a job or the open app session (default: the last job)

### `box cancel [JOB]`

Cancel the job running now (default: the last one). The command that was following it exits 130

### `box why [JOB]`

Why a failed job failed: the file:line, the cause and the fix direction, read by AI from the crash reports, failing tests and log (default: the last job)

## Money

### `box usage`

Your jobs and what each cost

| option | what it does |
| - | - |
| `--from YYYY-MM-DD` | First day in KST (UTC+9); default 29 days before `--to`, at most 92 days back |
| `--to YYYY-MM-DD` | Last day in KST, included; default today. One request covers at most 92 days |
| `--csv` | Save an Excel-ready file |
| `-o, --output FILE` | The CSV file to write (default `box-usage-<from>-<to>.csv`) |

### `box balance`

Every balance change (top-ups, the signup credit, job charges) with the balance after each. Takes the same `--from`, `--to`, `--csv` and `-o` (default `box-balance-<from>-<to>.csv`)

### `box topup`

Open the wallet top-up page

| option | what it does |
| - | - |
| `--print` | Print the link only |
| `--wait` | After the link, stay until the balance goes up |
| `--timeout SECONDS` | With `--wait`: give up after this many seconds (default 110); run it again to keep waiting |

### `box report [JOB] --reason "..."`

Report a job that failed on our side (the Mac, a time limit, a lost connection) or was charged wrong, for a refund (default: your last failed job). Not for your app’s own compile or test errors. Also `box bug`

### `box claims`

Your job reports and their results: refunded, or declined with the reason

## Settings and feedback

### `box ai [on|off|status]`

box AI for your account (on by default). Off: no failed job’s log, test results or screens go to the AI models from then on, and `box why` and the `ai:` line stop

### `box telemetry [on|off|status]`

Error reports to the box team. `BOX_TELEMETRY=0` or `DO_NOT_TRACK=1` also turn them off

### `box feedback "TEXT"`

Send a note about box to the team, with your last job attached

| option | what it does |
| - | - |
| `--job JOB` | The job to attach instead of the last one |

## Example: the simulators on the Mac

What `box devices` printed, shortened to the first lines and the end

```text theme={"system"}
$ box devices
box: queue: job bj_ugo_q7pQwtSalUN4 (devices, ios, $0.05/min) submitted
[box] device iPhone 18 Pro                iOS 27.2   7E1520E8-8B30-4DE7-89CE-008848B269E6
[box] device iPhone 18 Pro Max            iOS 27.2   8086DD0D-0F7A-4450-96A2-DC69BAB7CA63
[box] device iPhone 17e                   iOS 27.2   954D8824-CC52-4540-B646-BD646893AF23
[box] device iPhone Air                   iOS 27.2   A5A4D257-EB39-4F4D-93DF-5ACCE67A2A55
[box] device iPhone 17                    iOS 27.2   C2224F16-C641-430A-9B04-01C206C62A10
…
[box] 45 simulators; pass one with --device "<name or udid>" (default iPhone 17, newest runtime)
box: bj_ugo_q7pQwtSalUN4 succeeded, 60s billed, $0.05
```

## Environment

| variable | what it does |
| - | - |
| `BOX_API_KEY` | An API key from `box key create`; box then needs no `box login` |
| `BOX_TOKEN` | A sign-in token for a cloud agent with no saved home folder |
| `BOX_API` | The box server to use (default: the one box was installed from, else `https://xenoci.com/api`). The setup, terms and top-up pages follow it |
| `BOX_TELEMETRY=0` | No error reports, like `box telemetry off`. `DO_NOT_TRACK=1` does the same |
| `BOX_VERSION` | For the installer: install this version instead of the latest |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.