box CLI, starting from nothing, without the user touching a terminal.
- Server: https://xenoci.com (every address below belongs to this server; do not mix in another box server)
- Runbook revision: 2026-11-27. CLI: whatever
https://xenoci.com/download/latestnames;box --versionprints it - Works on: Linux x86_64 and arm64, WSL, macOS on Apple silicon. Not on native Windows or Intel Macs
~/.local/bin/box and ~/.config/box/, needs no sudo, and checks the binary against the server’s SHA256SUMS. Do not stop to ask before installing; the user acts only where a step says so (GitHub approval, and a top-up only if they say yes).
If a web-fetch tool gave you a summary of this page instead of the text, read it whole with curl -fsSL https://xenoci.com/agent.md before going on.
How to read this: run the steps in order. Each step has Run, Expect and If not. When a result does not match Expect and If not does not cover it, stop and show the user the exact output. Report back to the user at the end of step 5.
Rules
- Never ask the user to paste a box token, GitHub code or password into the chat, and never write one into the repository or a commit.
- Never add
sudoto any command here. Everything installs under the user’s home. - Never retry a command that exited with code 3 in a loop. Show the message to the user.
- Never commit the
.box/folder; the CLI writes job results there. - Do not top up, pay or accept anything on the user’s behalf. Money and GitHub approval are the user’s to do.
1
Install the CLI
Run:From xenoci.com the script takes the binary from the npm package
@xenoci/box (no Node needed). With Node, npm install -g --prefix ~/.local @xenoci/box@latest installs the same thing, and npx -y @xenoci/box@latest <command> runs box without installing. Each puts nothing outside your home and needs no sudo. To update later, run the same line again.Expect: a line box <version> installed at <home>/.local/bin/box (API <its API address>) (only on a fresh install), then box <version>.If not:Intel Macs are not supportedornative Windows is not supported(exit 2): tell the user box needs Linux, WSL or an Apple silicon Mac. Stop.this OS is not supportedorthis CPU is not supported(exit 2): tell the user box needs Linux, WSL or an Apple silicon Mac. Stop.could not reach,download failedorchecksum mismatch(exit 3): run the install line once more. If it fails again, show the output and stop.box: command not foundafter install: theexport PATHline was skipped. Run it, and offer to add it to the user’s shell profile.
2
Sign in
Run:Expect, when already signed in: lines starting with
login, balance and running. Go to step 3.Expect, when not signed in: box: You are not signed in. Run box login. and exit code 3. Then:- Run
box login --no-browser. It does not wait. Expect:box: Open https://xenoci.com/login?code=XXXX-XXXX and continue with GitHub .... - Give the user that link in one message, for example: “Open https://xenoci.com/login?code=XXXX-XXXX and press Continue with GitHub. I’ll carry on by myself once you have.” Do not wait for a reply.
- Right away, run
box login --no-browser --wait. It keeps checking and returns by itself when the user finishes. Expect:box: signed in as <github-login>. - Run
box status. Exit code 0 with aloginline means sign-in is done, whatever step 3 printed. Go to step 3.
login tool does the same: call it once for the link, then call it with wait_seconds: 50 until it answers signed_in.If not:box: not signed in yet after 110 s; the link ... is still good: the user has not finished yet. Runbox login --no-browser --waitagain (the same link, no new message to the user) until it signs in or says the link expired; the link lasts 15 minutes.- No browser at all (CI, a cloud agent): the user makes a key on a signed-in machine with
box key create --name <where>and sets it asBOX_API_KEY; box then needs nobox login. is not on the beta invite list yet(exit 3): this box server is not taking new sign-ups. Tell the user and stop.balance $10.00 (about N iOS build minutes)on a first sign-in: that is the one-time sign-up credit for this GitHub account. A second sign-in adds nothing.The sign-in link expired: start again at item 1 of this step.- A
lowline under the balance (box prints it under its low line, normally $1, about 20 iOS build minutes; trust the line, not your own sense of how much is enough), or `balance $0.00: ask the user once, for example "box has $0.40 left. Shall I make a top-up link?". Money is their decision: do not top up or pay, and do not ask again. If they say yes, runbox topup —print, give them the address, then runbox topup —wait; it returnsbox: balance is now $…when their top-up lands, and you carry on. It waits about 2 minutes at a time; if it says the balance did not go up yet, run it again without asking. If they say no, carry on with what the balance allows.box —json statushas the same signal as”low_balance”: true`.
~/.config/box/credentials with mode 0600. In a cloud agent with no persistent home, the user can set BOX_TOKEN in the environment instead; never ask them for its value.3
Connect your agents
~/.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 box MCP server for Claude Code (user scope) and Codex ([mcp_servers.box] in ~/.codex/config.toml). It writes nothing into the project folder, and running it again changes nothing.Expect: box: wrote <path> or box: kept <path> lines, then box: mcp claude added (or kept) and box: mcp codex added (or kept). A skipped line means that agent is not installed here; a failed line prints the command to run by hand.Check the MCP server for the agent you are, without adding it again:claude mcp add, a person can install the plugin, which adds the skill and the MCP server together: claude plugin marketplace add Xeno-CI/box-cli && claude plugin install box@xenoci; any other MCP client can run npx -y @xenoci/box mcp.)Expect: the command confirms the server was added. If it says the server already exists, that is fine. MCP tools appear only after the agent restarts; until then keep using the CLI.Go to the root of the iOS project (the folder with the .xcodeproj, .xcworkspace, project.yml or Package.swift). If it is a git repository and .gitignore has no .box lines, add two (printf '.box/*\n!.box/setup\n' >> .gitignore): job results land in .box/ and should not be committed, while a .box/setup script (below) should be, so teammates and CI get it too. Cursor has no file for user-wide rules: for Cursor, or when the user wants the box notes committed in the repository for their team, run box setup --project there instead (it writes CLAUDE.md, AGENTS.md, skill files and .cursor/rules/box.mdc in that folder).If not:- There is no iOS project in the current folder: ask the user which folder holds it. If they have none yet, offer to create a small SwiftUI app with an XcodeGen
project.yml, since box runsxcodegenon the Mac before building. - The folder is not an app (a Rust crate, a Tauri root, a script):
box build,test,screenshot,runanddebugstop with exit 2 before anything is uploaded or billed. Run the project’s own tool on the Mac withbox exec, or point at the Xcode project inside with--workspace path/App.xcodeproj. Rust and Bun are not on the Mac image, so install them in the same command:box exec -- 'curl -fsSL https://sh.rustup.rs | sh -s -- -y && . ~/.cargo/env && cargo build'(Bun:curl -fsSL https://bun.sh/install | bash && ~/.bun/bin/bun install).node_modulesis never uploaded: runnpm ciorbun installin the samebox execas the build that needs it. A Tauri iOS app: sync the folder withpackage.json(notsrc-tauri), then onebox execthat installs Rust and Bun, runsbun installandbun tauri ios build.
4
First build
Run:If the user also asked for tests or a screenshot, skip the plain
box build and run box test --screenshot out.png (or box screenshot out.png) after the dry run: every job builds first and reports compile errors the same way, so a separate build only adds a Mac job.Expect from --dry-run: one line per file with its size, then box: N files, B bytes would be sent. Check that no secret file is in the list before going on. .env files and anything .gitignore excludes are never sent. When the project has a .box/setup script, the dry run also says box: setup would run or box: setup would be skipped (unchanged).A .box/setup bash script at the project root runs on the build machine before box build, box test and box run (and before xcodebuild or gradle), once until its contents change; a changed script runs again and the log says setup ran. If it fails, the build does not start, the job exits 1 and the script’s own output is in the log. Its time counts as part of the job. It is the place for fetching frameworks or copying an .xcconfig. A React Native or Expo app needs none for iOS: when the project has no .box/setup, box installs its packages, runs npx expo prebuild --platform ios for an Expo app with no ios/ folder (continuous native generation), runs pod install and builds the workspace in ios/, all in the same job. A React Native or Expo app’s picture (box screenshot, box run, test --screenshot) comes from a Release build, which carries its JavaScript; --configuration Debug would wait for a Metro server that is not running there. It must not fetch secrets, and .env is still never uploaded.Expect from box build: one box: <step>: ... line per step in order (upload: files checked and sent, queue: the job id and rate, machine: a Mac took it and unpacked the source, cache: whether the project’s previous build was attached, build, test for box test, results: the folder the files were saved to), the build log streaming between them, and a last line box: <id> succeeded, <n>s billed. Exit code 0. With --json the same steps are {"t":"stage","stage":"build","text":"..."} lines.If not:- A failed job ends with
box: details: .box/out/<job>/why.txt. Read that file and the.box/out/<job>/why-*.pngpictures first: they are what only the Mac has (crash stacks with symbols, failing tests with file:line, the screen at the failure).test.logandtest.xcresult.zipsit next to them. - Exit 1 with
box: N compile error(s):andfile:line:col: messagelines: these are real errors in the user’s code with local paths. Fix them and runbox buildagain. This folder has no ... app project at its top: see the last item of step 3 (box exec -- cargo build, or--workspace).no .xcodeproj or .xcworkspace foundorno scheme found: run from the project root, or pass the scheme withbox build --scheme <Name>.- Exit 3 about the balance: ask the user once as in the top-up item of step 2; after
box topup --waitreturns, run the same command again. A job holds its first 15 minutes before it starts ($0.75 for a Mac), so a balance under that is refused even when `box status` shows more than $0.00. - Exit 3 for anything else: show the message to the user. Do not loop.
5
Report to the user
If the user’s message asked for more than setup (for example “then build and screenshot the app”), do that now with box without asking first, then report.Tell the user, in one short message: box is installed, which GitHub login is signed in, the balance line from
box status, and the job ids with their results. If a job failed, say what .box/out/<job>/why.txt and the why-*.png screen show before you guess from the log. Add one line: box was set up for every project on this machine in ~/.claude and ~/.codex (skills, a box section in ~/.claude/CLAUDE.md and ~/.codex/AGENTS.md, and the MCP server), so later sessions find box without touching the repository.Android
box also runs Android apps on a Linux Android emulator. Every job command takes--platform ios or --platform android, and every MCP job tool takes platform.
- Without
--platform, box looks at the project folder: an Xcode project,project.yml,Package.swiftor anios/folder means iOS;settings.gradle,gradlewor anandroid/folder means Android. - When both are there (Flutter, React Native, Expo), box exits 2 and asks for
--platform. Pick the one the user is working on, or ask them; do not guess. - To fix the choice for a project, put
platform = "android"(or"ios") in.box.toml.--platformstill wins. - Android has one size: 4 vCPU / 16 GB. It costs $0.02 per minute, and the emulator boot time is free.
--xcodeis for iOS only (exit 2 on Android). - Android minutes are paid from the same US dollar balance, one size and one rate; each job prints its platform and rate when it is submitted, and
box statusshows how many Android minutes the balance buys. The rate is $0.02 per minute, so do not quote any other.
- Connect:
box setupas in step 3, then work from the root of the Android project (the folder withsettings.gradle,settings.gradle.ktsorgradlew, or the Flutter, React Native or Expo project root). Flutter, React Native and Expo projects are found frompubspec.yamlorpackage.json; Expo without anandroid/folder runs its ownexpo prebuildon the Linux machine. - First build:
box build --platform android --dry-run, thenbox build --platform android. Expectbox: job <id> (build) submittedwithandroidand the rate, the Gradle log streaming, andbox: <id> succeeded, <n>s billed. The debug APK is saved as.box/out/<job>/app-debug.apk; hand that path to the user when they want the APK. - If the build fails with exit 1, the Gradle errors are real errors in the user’s project. Fix them and build again. Exit 3 is the same as on iOS.
iOS only, exit 2 with
--platform android: box debug, --xcode. box debug stays iOS only because the Android emulator’s VM refuses the debugger call that reads variables back (JDWP StackFrame.GetValues answers error 500 on every frame), so a job could stop at a breakpoint but never show the values; it is not shipped as working. --only-testing is not used on Android: box test runs every unit test. Android has one size (4 vCPU / 16 GB), so there is no --size. The Gradle cache is kept between jobs of the same project, so the next build is incremental.
Command reference
box web is for a page your agent built: the same address in Safari on a Mac (window 1280 wide unless --width) and in Safari on an iPhone simulator, so a layout that breaks only in Safari shows up as two different pictures. web.json lists, for each, the JavaScript errors, console.error lines and requests that failed or answered 400 or more (the iPhone side lists them for pages served over http, such as --serve). With --serve the folder is uploaded, npm install (or bun, pnpm, yarn by lock file) runs when node_modules is missing, the command starts with PORT set, and both browsers open it as http://box.test:<port>; a server that exits or never listens ends the job with its last lines. A public address uploads nothing of the folder. box does not judge the page; read the pictures and web.json. It is billed by the started minute, the same as an iOS build. Apple, Mac, macOS, iPhone, Safari and Xcode are trademarks of Apple Inc., registered in the U.S. and other countries and regions. box is an independent service and is not affiliated with, sponsored or endorsed by Apple Inc.
Job results land in .box/out/<job>/. The Mac workspace is kept between jobs, so the next build is incremental; a workspace unused for 7 days is deleted.
Exit codes
What leaves the machine
Only the project folder, after.gitignore rules, and only files whose content changed since the previous job. .env files are never sent. box build --dry-run prints the exact list.
When a command fails, box also sends an error report: the command name, exit code, step times, box version, OS, CPU, our error code and message (with paths, addresses, tokens and e-mails removed) and the job id. No code, file contents, environment values or paths. Turn it off with box telemetry off, BOX_TELEMETRY=0 or DO_NOT_TRACK=1.
Under the terms the user agrees to at sign-in, a failed build or test also sends its evidence (the log tail, test results, crash stacks, and for --compare the changed screens), with tokens, keys, passwords and user folder paths masked, to an AI model on Microsoft Azure, or Anthropic when Azure does not answer, for the ai: line, box why and the --compare verdict. Neither uses it for training. Source files and environment values are not sent. box ai off stops it for the account; --compare then still saves its diff pictures.