Expo Builder reference
Read
expo-builder-corefirst if you haven't this conversation.
Shared tables for the Expo skills. Owner-specific choices (accounts, repos, budgets) live in memory, not here.
1. Shell environment
Start every shell with source /home/box/expo-builder/env.sh; if missing, write it from the script below. It's idempotent and user-scoped: it installs Node and pnpm under $HOME/expo-builder on first use (set EXPO_BUILDER_NO_BOOTSTRAP=1 to only print the install command). Check: node -v (v22.x, ≥22.13), pnpm -v (11.27.0), command -v pnpm (not /usr/bin/pnpm). eas, agent_cli and create_launch are real executables in $EXPO_BUILDER_HOME/bin (not shell functions), so they work under timeout and xargs. Bump pins via the weekly routine, then re-source.
EXPO_BUILDER_HOME="${EXPO_BUILDER_HOME:-$HOME/expo-builder}"
EXPO_BUILDER_NODE_VERSION="${EXPO_BUILDER_NODE_VERSION:-22.23.3}" # SDK 58 tooling + pnpm 11 need >=22.13 (even major)
EXPO_BUILDER_PNPM_VERSION="${EXPO_BUILDER_PNPM_VERSION:-11.27.0}" # = pnpm on the EAS sdk-58 images
EXPO_BUILDER_EAS_CLI_VERSION="${EXPO_BUILDER_EAS_CLI_VERSION:-24.11.0}"
EXPO_BUILDER_AGENT_CLI_VERSION="${EXPO_BUILDER_AGENT_CLI_VERSION:-1.0.18}"
EXPO_BUILDER_CREATE_LAUNCH_VERSION="${EXPO_BUILDER_CREATE_LAUNCH_VERSION:-0.4.1}"
export EXPO_BUILDER_HOME EXPO_BUILDER_NODE_VERSION EXPO_BUILDER_PNPM_VERSION \
EXPO_BUILDER_EAS_CLI_VERSION EXPO_BUILDER_AGENT_CLI_VERSION EXPO_BUILDER_CREATE_LAUNCH_VERSION
_eb_node_dir="$EXPO_BUILDER_HOME/node-v$EXPO_BUILDER_NODE_VERSION"
_eb_bin_dir="$EXPO_BUILDER_HOME/bin"
export COREPACK_HOME="$HOME/.cache/node/corepack"
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
export pnpm_config_update_notifier=false
_eb_install_node() {
_eb_arch="$(uname -m)"
case "$_eb_arch" in x86_64) _eb_arch=x64 ;; aarch64|arm64) _eb_arch=arm64 ;; esac
_eb_tgz="node-v$EXPO_BUILDER_NODE_VERSION-linux-$_eb_arch.tar.gz"
_eb_url="https://nodejs.org/dist/v$EXPO_BUILDER_NODE_VERSION"
echo "[expo-builder] installing Node $EXPO_BUILDER_NODE_VERSION into $_eb_node_dir" >&2
mkdir -p "$EXPO_BUILDER_HOME" && _eb_tmp="$(mktemp -d)" &&
curl -fsSL "$_eb_url/$_eb_tgz" -o "$_eb_tmp/$_eb_tgz" &&
curl -fsSL "$_eb_url/SHASUMS256.txt" -o "$_eb_tmp/SHASUMS256.txt" &&
(cd "$_eb_tmp" && grep " $_eb_tgz\$" SHASUMS256.txt | sha256sum -c - >/dev/null) &&
tar -xzf "$_eb_tmp/$_eb_tgz" -C "$EXPO_BUILDER_HOME" &&
mv "$EXPO_BUILDER_HOME/node-v$EXPO_BUILDER_NODE_VERSION-linux-$_eb_arch" "$_eb_node_dir"
_eb_rc=$?; rm -rf "$_eb_tmp"; return $_eb_rc
}
_eb_install_pnpm() {
echo "[expo-builder] activating pnpm $EXPO_BUILDER_PNPM_VERSION via corepack" >&2
"$_eb_node_dir/bin/corepack" enable pnpm &&
"$_eb_node_dir/bin/corepack" prepare "pnpm@$EXPO_BUILDER_PNPM_VERSION" --activate >/dev/null
}
_eb_write_wrapper() {
_eb_w="$_eb_bin_dir/$1"
mkdir -p "$_eb_bin_dir"
cat > "$_eb_w" <<WRAP
#!/usr/bin/env bash
# Auto-generated by expo-builder/env.sh. Do not edit; edit env.sh instead.
# Real executable wrapper for: pnpm dlx $2@<pinned>
set -euo pipefail
EXPO_BUILDER_HOME="\${EXPO_BUILDER_HOME:-\$HOME/expo-builder}"
EXPO_BUILDER_NODE_VERSION="\${EXPO_BUILDER_NODE_VERSION:-$EXPO_BUILDER_NODE_VERSION}"
_nd="\$EXPO_BUILDER_HOME/node-v\$EXPO_BUILDER_NODE_VERSION"
if [ ! -x "\$_nd/bin/pnpm" ]; then
if [ -n "\${EXPO_BUILDER_NO_BOOTSTRAP:-}" ]; then
echo "[expo-builder] toolchain missing; run: unset EXPO_BUILDER_NO_BOOTSTRAP; source \$EXPO_BUILDER_HOME/env.sh" >&2
exit 127
fi
# shellcheck source=/dev/null
. "\$EXPO_BUILDER_HOME/env.sh" >/dev/null 2>&1 || true
fi
case ":\$PATH:" in *":\$_nd/bin:"*) ;; *) PATH="\$_nd/bin:\$PATH" ;; esac
export PATH
exec pnpm dlx "$2@\${$3:-<pin>}" "\$@"
WRAP
sed -i "s/<pin>/$(eval echo \$$3)/" "$_eb_w"
chmod +x "$_eb_w"
}
if [ ! -x "$_eb_node_dir/bin/node" ]; then
if [ -n "${EXPO_BUILDER_NO_BOOTSTRAP:-}" ]; then
echo "[expo-builder] Node $EXPO_BUILDER_NODE_VERSION missing. Install: unset EXPO_BUILDER_NO_BOOTSTRAP; source $EXPO_BUILDER_HOME/env.sh" >&2
else
_eb_install_node || echo "[expo-builder] Node install failed (network?)" >&2
fi
fi
for _eb_p in "$_eb_bin_dir" "$_eb_node_dir/bin"; do
case ":$PATH:" in
*":$_eb_p:"*) PATH="$_eb_p:$(printf '%s' ":$PATH:" | sed "s#:$_eb_p:#:#g; s#^:##; s#:\$##")" ;;
*) PATH="$_eb_p:$PATH" ;;
esac
done
export PATH
if [ -x "$_eb_node_dir/bin/node" ]; then
if [ ! -e "$_eb_node_dir/bin/pnpm" ] ||
[ "$(cd "$HOME" && "$_eb_node_dir/bin/pnpm" -v 2>/dev/null)" != "$EXPO_BUILDER_PNPM_VERSION" ]; then
if [ -n "${EXPO_BUILDER_NO_BOOTSTRAP:-}" ]; then
echo "[expo-builder] pnpm $EXPO_BUILDER_PNPM_VERSION missing. Install: $_eb_node_dir/bin/corepack enable pnpm && $_eb_node_dir/bin/corepack prepare pnpm@$EXPO_BUILDER_PNPM_VERSION --activate" >&2
else
_eb_install_pnpm || echo "[expo-builder] pnpm activation failed" >&2
fi
fi
fi
hash -r 2>/dev/null
_eb_write_wrapper eas eas-cli EXPO_BUILDER_EAS_CLI_VERSION
_eb_write_wrapper agent_cli @expo/agent-cli EXPO_BUILDER_AGENT_CLI_VERSION
_eb_write_wrapper create_launch create-launch EXPO_BUILDER_CREATE_LAUNCH_VERSION
expo_builder_env_check() {
echo "node $(node -v) ($(command -v node))"
echo "pnpm $(cd "$HOME" && pnpm -v) ($(command -v pnpm))"
echo "eas wrapper: $(command -v eas)"
echo "create_launch wrapper: $(command -v create_launch)"
case "$(command -v pnpm)" in /usr/bin/pnpm) echo "WARN: system pnpm is first on PATH" ;; esac
echo "COREPACK_HOME=$COREPACK_HOME"
}
2. Commands (pnpm, never npm/npx)
- In a project:
pnpm install(CI=1 pnpm install --frozen-lockfilemirrors EAS);pnpm expo <cmd>(start,install,install --check,lint,export,prebuild,run:*);pnpm exec tsc --noEmit;pnpm run <script>;pnpm why --depth=10 <pkg>;pnpm peers check. - CLIs: the env.sh wrappers
eas,agent_cli,create_launch; anything elsepnpm dlx <pkg>@<exact version>(e.g.pnpm dlx expo-doctor@latest). No global installs (npm i -g,pnpm add -g): the box is shared. - Exceptions: a repo on
package-lock.json,yarn.lockorbun.lockkeeps that manager (migrating is a PR the owner approves);npx agent-device@latest …insideeas simulator:exec(EAS host) stays as written. - pnpm 11 facts:
.npmrcholds only auth/registry, package.json'spnpmfield is ignored, all settings go inpnpm-workspace.yaml; peer mismatches only warn; the linker is isolated by default; unreviewed dependency build scripts fail the install (ERR_PNPM_IGNORED_BUILDS→ add toallowBuildsafter checking the script); versions under a day old are skipped while an older one fits (minimumReleaseAge; don't disable globally).
3. Project files
package.json"packageManager": "pnpm@11.27.0"= pnpm on the EASsdk-58images; change it with eas.jsonpnpm.pnpm-workspace.yaml, committed together withpnpm-lock.yaml:# SDK 58 beta only: the RN RC expo@58 expects. Remove at stable (expo-sdk-upgrade). overrides: react-native: 0.88.0-rc.3 # = node_modules/expo/bundledNativeModules.json "react-native" allowBuilds: unrs-resolver: true # eslint-config-expo resolver; frozen installs (EAS) fail without it- Drop
overridesoncelatest≥ 58 (pnpm view expo dist-tags). - Use pnpm's default isolated linker, which Expo supports, and never switch
nodeLinkeraway from it, not even as a fallback. If a native library breaks under isolated installs, find duplicates withpnpm why, pin them withoverrides, and report or replace the library. - Delete any old
.npmrcthat haslegacy-peer-deps.
- Drop
.gitignorecovers.env*(except.env.example),.env.eas-simulator, keys, keystores, and the generatedios//android/(managed workflow).ios.bundleIdentifierandandroid.packageset explicitly. A staticapp.jsonstays the base;app.config.tsspreads...config.ios.infoPlist.ITSAppUsesNonExemptEncryption: false(EAS warns without it; TestFlight requires the answer). Custom non-exempt encryption → ask first (trueplus export-compliance paperwork).expo-env.d.tsexists beforetsc(/// <reference types="expo/types" />; gitignored).
4. eas.json and build images
| Use | ios.image |
android.image |
|---|---|---|
| SDK 58 dev/preview | sdk-58 (Xcode 27.0) |
sdk-58 |
| SDK 58 production/store | macos-tahoe-26.6-xcode-27.0 |
ubuntu-26.04-jdk-17-ndk-r27b-sdk-58 |
| Xcode 27.1 beta (opt-in, simulator/dev only, never store) | macos-tahoe-26.6-xcode-27.1 |
unchanged |
| SDK 57 projects | sdk-57 |
sdk-57 |
Never leave SDK 58 on latest (SDK 57 image, Xcode 26.6). sdk-58 iOS verified 2026-10-07 (macos-tahoe-26.6-xcode-27.0, Xcode 27.0 (27A266a), pnpm 11.27.0); aliases move, so check "Spin up build environment" each run, else pin the full name. Re-check https://docs.expo.dev/build-reference/infrastructure.md on image changes.
{"cli":{"appVersionSource":"remote"},
"build":{
"base":{"pnpm":"11.27.0"},
"development":{"extends":"base","developmentClient":true,"distribution":"internal",
"ios":{"image":"sdk-58"},"android":{"buildType":"apk","image":"sdk-58"}},
"development-simulator":{"extends":"base","developmentClient":true,"distribution":"internal",
"ios":{"simulator":true,"image":"sdk-58"},"android":{"buildType":"apk","image":"sdk-58"}},
"development-xcode-27-1":{"extends":"development-simulator","ios":{"image":"macos-tahoe-26.6-xcode-27.1"}},
"preview":{"extends":"base","channel":"preview","distribution":"internal",
"ios":{"image":"sdk-58"},"android":{"image":"sdk-58"}},
"production":{"extends":"base","channel":"production",
"ios":{"image":"macos-tahoe-26.6-xcode-27.0"},"android":{"image":"ubuntu-26.04-jdk-17-ndk-r27b-sdk-58"}}}}
Ship both dev profiles (development for devices, development-simulator). EAS picks pnpm from pnpm-lock.yaml (--frozen-lockfile). No upstream "cli": {"version": ">= 16.0.1"}.
4a. QR codes and deep links
QR libraries read stdin and hang a non-interactive shell: pass the text as an argument, redirect stdin, write a file, pin the version:
pnpm dlx qrcode@1.5.4 -o devclient-qr.png -w 600 "<text>" </dev/null
Dev-client link: exp+<slug>://… per expo-builder-core (newer CLIs print the equivalent exp+<slug>://?__expo_url=…). Without a log, @expo/cli's rule: exp+ + slug, lowercased, chars outside A-Za-z0-9+-. dropped. Expo Go: exp://<host>. One QR PNG per link.
4b. Testing ladder
- Web preview:
pnpm expo start --web+ box browser screenshot (fastest, no device). - Cloud simulator:
expo-cloud-sim-verify(iOS/Android, no owner device). - Dev build on the owner's device (dev client with Fast Refresh): EAS ad hoc
developmentbuild (device registered first) or a store-signeddevelopmentprofile via TestFlight. - Testers: internal
previewbuild +eas update. - TestFlight / internal track, then store:
expo-launch-appor EAS submit (release builds, no dev client; Launch has no build-profile option, so it never gives a dev build).
5. Autonomy guards
| Action | Default |
|---|---|
Read repos, docs, EAS state; edit, lint, test, export, prebuild (never committed) in box clones; pnpm expo install |
Autonomous |
| Push a branch, open a draft PR on allow-listed repos | As the owner decided (never merge) |
EAS Simulator sessions, simulator/dev builds (no credentials), eas update to preview/PR branches, preview eas deploy |
Autonomous within budget (§6) |
Signed internal/preview builds, eas init, credentials:*, production env:*, any *:delete, eas deploy --prod, create-launch --json |
Ask first |
Production eas update, update:republish, channel:rollout/channel:edit, eas submit, --auto-submit, metadata:push, store review replies |
Ask first, always (draft commands plus rollback) |
Expo feedback (submit-expo-feedback), upstream issues/PRs, Slack posts |
Draft for owner approval |
billing:*, create-launch logout, printing .env.eas-simulator, ~/.expo/state.json, preview-API URLs or tokens |
Never |
Live edits and dev-client links: expo-builder-core (Builds, spending and live edits).
6. Default budgets (the owner sets real numbers; memory overrides these)
- EAS builds: ≤50% of the plan's included builds; reuse, then simulator/dev builds first; ≤1 bot build in flight, ≤2 queued.
- Cost gate (
expo-builder-core) at build time:eas account:usage --json→builds.plan.percentUsed,builds.overage.costCents. Ad hoc iOS builds bake in registered devices: re-readeas device:list --jsonafter changes. - EAS Simulator: ≤6 sessions/day,
--max-duration-minutes 30 --max-idle-time-minutes 10 --tag grok-bot; always stop sessions. - Workflows: PR pipeline only on allow-listed repos; skip docs-only PRs. Usage alerts at 50% and 80% of budget.
7. Evidence contract
Every "done", PR or report carries: exact commands and exit codes; UI screenshots (box browser for web, cloud sim for iOS/Android) and a recording for motion; EAS links (build, deviceRunSessionUrl replay, update group); and what was not verified. Can't reproduce or verify → say so. A build/submit fix is untested ("rebuilding") until the re-run passes; report the result when it lands.