macbox

Get started with macbox

macbox runs Xcode and the iOS simulator on a real Mac in the cloud, so your coding agent can build, test, run, and tap through iOS apps from any machine, including Linux and cloud sandboxes.

To set it up, tell your agent: "Set up macbox by following https://api.macbox.build/guide/". You'll sign in with GitHub when it asks. New accounts start with $10 of credit.

Setup (for the agent)

Do these steps for the user, in order, and tell them what you did at the end.

1. Install the CLI

command -v macbox || curl -fsSL https://api.macbox.build/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
macbox version

2. Log in

First check: macbox status. If it shows credit, skip to step 3.

Otherwise run macbox login. It prints a link and a code, then exits without waiting. Give the user the link. They open it, check the code matches, and sign in with GitHub; a new user gets an account with $10 of credit on the way. When they say they're done, run macbox login again. It finishes and shows their minutes left.

Then check: macbox status shows their credit and their Mac, which should say online.

3. Connect to macbox

From the root of the user's iOS project:

macbox setup
claude mcp add macbox -- macbox mcp      # Claude Code
codex mcp add macbox -- macbox mcp       # Codex

macbox setup installs the macbox skill for Claude Code and Codex, adds a Cursor rule, and adds a short marked note to the project's CLAUDE.md and AGENTS.md (anything already in them is kept). The note is how every agent that opens the repo, including cloud agents and teammates' agents, knows to use macbox. Offer to commit CLAUDE.md, AGENTS.md, and .cursor/rules/macbox.mdc. For other agents (Gemini CLI, OpenCode, and more), npx skills add opslane/macbox-agent installs the same skill.

Run the MCP lines for the agents the user has. They give you build, test, screenshot, and run, plus describe, tap, type, swipe, and look for the running app. The MCP tools appear after the agent restarts; until then, use the CLI.

4. Try it

macbox build --dry-run    # what would be sent
macbox build
macbox test
macbox run                # launches the app and prints a live link: give it to the user
macbox ui describe        # what is on screen, with element ids
macbox ui tap --id <id>
macbox stop

Using macbox well

Xcode tools (MobileBuildMCP)

For deeper work: LLDB debugging (breakpoints, stack, variables), Swift package builds and tests, simulator location and appearance, video. It is MobileBuildMCP (Sentry's open-source MCP server for Xcode), running on the macbox Mac:

claude mcp add macbox-xcode -- macbox mcp --xcode
codex mcp add macbox-xcode -- macbox mcp --xcode

Several folders at once (git worktrees)

macbox runs two of your folders at the same time, on your one Mac. Each folder keeps its own code and build cache, and each running folder gets its own simulator. A third folder waits until one finishes; if both are busy with sessions, the older session ends to make room. Builds and tests are never cut short. In one folder, jobs take turns.

Where your code goes

What gets sent

What it costs

$0.05 per Mac minute. Each job pays for the whole minutes it ran; the part of a minute left over is free, so a job under a minute costs nothing. You pay only while a build, tests, a screenshot, or a live session runs. Uploading, waiting in line, and starting the VM are free. If something breaks on our side, you are not charged. Two folders at once cost twice as much per minute and finish sooner. macbox status shows what's left.

What works today

What we log

So we can help before you have to ask, macbox records what each command did and how it ended: the command or MCP tool, exit code, how long it took, the job, the first error line (it may name a file), the CLI version, your OS, and which agent ran it. Never your code or file contents. We may read a job's output on the Mac when debugging it.

Help

Ask in the Discord (https://discord.gg/zukPCGsTnw), reply to your invite email, or run macbox feedback "...". We read every one.