Setup

From ziyzhu/openox · View interactive version

Setup is an AI agent skill from the GitHub repository ziyzhu/openox. Set up OpenOx for CLI, macOS Host, or iOS development. Use for dependencies, simulator provisioning, signing, bundled services, first launch, contribution preparation, or setup troubleshooting.

How to use this skill

Skill file

Setup

Read the repository AGENTS.md and README.md. Install Bun 1.3 or newer. Clone the repository if needed and run commands from its root:

git clone https://github.com/ziyzhu/openox.git
cd openox
bun install

Inspect existing tools and configuration first. Preserve the contributor’s devices, bundle ID, signing team, and local data. Keep machine-specific values in ignored files. On Linux, use the CLI and repository tooling; native apps require a Mac.

Ox CLI

(cd apps/cli && bun run build && bun link)
ox --help
ox host list --help

Link from apps/cli, not the workspace root. If ox is missing or shows stale commands, inspect command -v ox and resolve the PATH or existing install without overwriting unrelated executables. A source link follows one checkout; to run the CLI from a different checkout, use bun apps/cli/src/ox.ts there. For a standalone install, see apps/cli/install.sh.

macOS Host

Use macOS 26+, Xcode, and XcodeGen 2.46+ (brew install xcodegen).

bun run build:services
bun run build:agent
DERIVED_DATA=$(mktemp -d)
bun run build:macos -derivedDataPath "$DERIVED_DATA"
"$DERIVED_DATA/Build/Products/Debug/OxHost.app/Contents/MacOS/OxHost"

Stop an existing Host before launching another. Verify its status in the menu bar; the Host has no chat UI. Use --allow-connections to enable remote access and --disable-connections to turn it off. Normal connections require Tailscale; OX_HOST_ENDPOINT selects the port, not the interface. For Debug-only local verification, launch with OX_HOST_LOOPBACK=1 OX_HOST_ENDPOINT=ws://127.0.0.1:19876. Do not reuse an iOS container for the Mac Host.

Build and run on an iPhone

Use a Mac with Xcode that supports the phone’s iOS version. The iPhone must run iOS 26 or later. Sign in to your Apple Account under Xcode → Settings → Accounts. A direct Xcode install does not require App Store Connect access, membership on the OpenOx team, or Beta App Review.

After bun install, run bun run setup:iphone for the guided setup. It asks for your signing team ID (or accepts --team-id <ID>), suggests IDs from local Apple Development signing identities when available, and generates a unique bundle ID for a new LocalOnly config. It preserves existing config files, builds the bundled resources, and opens the Xcode project. Then follow steps 3–4 below. For manual setup or an iCloud build, start at step 1.

  1. From the checkout root, prepare the bundled resources:

```sh

bun run build:services

bun run build:agent

```

  1. If apps/ios/Local.xcconfig doesn’t exist, copy apps/ios/LocalOnly.xcconfig.example to that path for a build without iCloud, or use apps/ios/Local.xcconfig.example for iCloud. Replace the example OX_DEVELOPMENT_TEAM with your signing team’s ID. If you don’t belong to a developer team, sign in with a free Apple Account and use your Personal Team with LocalOnly. Replace OX_BUNDLE_IDENTIFIER with a unique reverse-DNS identifier you choose, such as com.janedoe.openox. You don’t need to own the domain or register the identifier manually. Keep automatic signing enabled for both the app and the share extension.
  1. Open apps/ios/Ox.xcodeproj in Xcode. Connect and unlock your iPhone, trust the Mac when prompted, and select the phone as the run destination for the ios scheme. If prompted, enable Developer Mode on the phone and confirm after it restarts.
  2. Press ⌘R to build, install, and launch Ox. Verify that onboarding or the main screen opens on the phone.

The iCloud build needs a paid team and the iCloud container iCloud.<OX_BUNDLE_IDENTIFIER>. LocalOnly removes iCloud but retains App Groups for the share extension. Apple lists iOS App Groups as available to free accounts, but OpenOx hasn’t been verified on an iPhone with Personal Team signing. Free provisioning profiles expire after seven days, so rebuild and reinstall when needed. See signing diagnostics if provisioning fails.

Build and run in the iOS simulator

No Apple Account is needed. Install the required runtime in Xcode, then run bun run build:services and bun run build:agent.

  1. Use the fixed pool: ox-1–ox-3 run iOS 26 and ox-4–ox-5 run iOS 27. Reserve one available simulator before booting, installing, or launching. Resolve its UDID and never target an implicit booted device.
  2. Keep your existing apps/ios/Local.xcconfig; if absent, copy apps/ios/LocalOnly.xcconfig.example to that path as-is. Follow the first simulator run for ad-hoc signing, which ignores the example team ID. Verify onboarding or the main screen.
  1. Release your claim when done and shut down the simulator if you booted it for this task. Leave other simulators and their data alone.

For seeded QA, use device templates. ChatGPT login transfer is a separate, opt-in workflow.

Contributing

For source changes, run bun run lint, bun run build, and bun run test, and build each affected native target. The build guide covers native builds and project generation; regenerate the tracked iOS project when apps/ios/project.yml changes. Follow the release guide only for App Store work. Keep credentials and diagnostics outside Git, and report what you actually verified and any remaining blockers.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.