A cloud IDE for React Native in about 120 lines of Bash: one Linux sandbox with your checkout and Metro, an iOS simulator, an Android emulator, and code-server with both devices in a tab.
Works from macOS, Linux and WSL.
curl -fsSL https://raw.githubusercontent.com/v4dkou/bash-cloud-react-native-ide/main/cloud-ide.sh | bashThat installs cloud-ide into ~/.local/bin, adds the run.cloud CLI and jq if they are missing, signs you in and offers to start the workspace. After that:
cloud-ide up # sandbox, Metro, both devices, editor on http://127.0.0.1:8082
cloud-ide down # from a second terminal: save your edits and delete everything (Ctrl-C does the same)In the editor, run run.cloud: Show Simulators from the Command Palette. On first load, tap Open when iOS asks and close the Expo Go menu.
Your own app, if it is a public GitHub repo with a package-lock.json and runs in Expo Go:
PROJECT_REPO=https://github.com/OWNER/REPO PROJECT_REF=your-commit-sha cloud-ide upAdd PROJECT_DIR=apps/mobile if the app is not at the repo root.
How it works, line by line: A cloud IDE for React Native.
I work on run.cloud, and this script uses run.cloud for the sandbox, the iOS simulator and the Android emulator. Nothing else in it depends on us. You are welcome to swap the sandbox or the simulator stack for one of our competitors: the calls to change are the runcloud sandbox, runcloud ios and runcloud android commands in cloud-ide.sh.
cloud-ide.sh: the whole thing, installer included.cloud-counter/: the sample Expo app the workspace opens by default.extension/andruncloud.simulator-previews-0.1.0.vsix: the small code-server extension that shows the two device streams in a tab.
