Skip to content

[eas-cli] Add simulator profiles command - #4323

Draft
krystofwoldrich-agent wants to merge 1 commit into
expo:mainfrom
krystofwoldrich-agent:codex/simulator-profiles
Draft

[eas-cli] Add simulator profiles command#4323
krystofwoldrich-agent wants to merge 1 commit into
expo:mainfrom
krystofwoldrich-agent:codex/simulator-profiles

Conversation

@krystofwoldrich-agent

Copy link
Copy Markdown

Why

EAS Simulator accepts Android device profile identifiers, but users currently have to guess which profiles are available on the runner. Add a discoverable command for both human workflows and scripts/agents.

How

  • Add eas simulator:profiles with the shorter eas sim:profiles alias.
  • Require --platform android|ios and support optional --json output.
  • Hardcode the Android runner inventory as readonly device and image tuples:
    • Pixel phone profiles from Pixel 6 through Pixel 9, excluding folds, tablets, watches, and TVs.
    • Installed x86_64 default and google_apis images from API 30 through API 36 (the available APIs are 30, 32, 34, 35, and 36).
  • Highlight pixel_9 in green and label it (default) in human-readable output.
  • Return a clear no-profiles message for iOS, including an error field in JSON mode.

Usage

eas sim:profiles --platform android
eas sim:profiles --platform android --json
eas sim:profiles --platform ios
eas sim:profiles --platform ios --json

Human-readable output

Devices:
  pixel_6
  pixel_6_pro
  pixel_6a
  pixel_7
  pixel_7_pro
  pixel_7a
  pixel_8
  pixel_8_pro
  pixel_8a
  pixel_9 (default)
  pixel_9_pro
  pixel_9_pro_xl
  pixel_9a

System images:
  system-images;android-30;default;x86_64
  system-images;android-30;google_apis;x86_64
  system-images;android-32;default;x86_64
  system-images;android-32;google_apis;x86_64
  system-images;android-34;default;x86_64
  system-images;android-34;google_apis;x86_64
  system-images;android-35;default;x86_64
  system-images;android-35;google_apis;x86_64
  system-images;android-36;default;x86_64
  system-images;android-36;google_apis;x86_64

For iOS:

No simulator profiles are available for iOS yet.

JSON output

{
  "devices": [
    "pixel_6",
    "pixel_6_pro",
    "pixel_6a",
    "pixel_7",
    "pixel_7_pro",
    "pixel_7a",
    "pixel_8",
    "pixel_8_pro",
    "pixel_8a",
    "pixel_9",
    "pixel_9_pro",
    "pixel_9_pro_xl",
    "pixel_9a"
  ],
  "images": [
    "system-images;android-30;default;x86_64",
    "system-images;android-30;google_apis;x86_64",
    "system-images;android-32;default;x86_64",
    "system-images;android-32;google_apis;x86_64",
    "system-images;android-34;default;x86_64",
    "system-images;android-34;google_apis;x86_64",
    "system-images;android-35;default;x86_64",
    "system-images;android-35;google_apis;x86_64",
    "system-images;android-36;default;x86_64",
    "system-images;android-36;google_apis;x86_64"
  ]
}

For iOS:

{
  "error": "No simulator profiles are available for iOS yet."
}

Test Plan

  • mise exec -- yarn workspace eas-cli test src/commands/simulator/__tests__/profiles.test.ts --runInBand
  • mise exec -- yarn workspace eas-cli typecheck
  • mise exec -- yarn workspace eas-cli build
  • mise exec -- yarn lint
  • mise exec -- yarn fmt:check
  • Ran all four usage examples above against the built CLI and verified the human and JSON output.

Co-authored-by: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com>
Co-authored-by: Codex <codex@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant