mirror of
https://github.com/stablyai/orca.git
synced 2026-10-14 00:02:42 +00:00
Adds the Orca Mobile companion app (Expo SDK 55 / React Native 0.83) with: - QR code pairing flow: scan orca://pair# URL, validate auth, save host profile - WebSocket RPC client with auto-reconnect, exponential backoff, streaming support - Three screens: host list, worktree list, terminal session with live output - Mock WebSocket server for development without a running Orca desktop instance - Desktop-side: TLS certificate management, device registry, mobile IPC handlers, WebSocket transport layer, and pairing offer encode/decode with Zod validation - Unit tests for WebSocket transport and pairing codec Co-authored-by: Orca <help@stably.ai>
Orca Mobile
React Native companion app for Orca. Monitor worktrees, view terminal output, and send commands from your phone.
Prerequisites
- Node.js 24+
- pnpm
- Expo Go app on your phone (from App Store / Google Play), or a dev client build
Quick Start
cd mobile
pnpm install
pnpm start # starts Expo dev server
Scan the QR code shown in the terminal with your phone's camera (iOS) or the Expo Go app (Android).
Development Paths
I have an Android phone
- Install Expo Go from Google Play
- Run
pnpm start, scan QR with Expo Go - For native modules (camera):
npx expo prebuild --platform android && cd android && ./gradlew assembleDebug - Install APK:
adb install android/app/build/outputs/apk/debug/app-debug.apk - Run with
pnpm start --dev-client
I only have a Mac (iOS Simulator)
- Install Xcode from the App Store
- Run
pnpm start --iosto open in iOS Simulator
Mock Server
Develop the mobile app without a running Orca desktop instance:
pnpm mock-server # starts mock WebSocket server on port 6768
Connect from the app using endpoint ws://localhost:6768 and token mock-device-token.
Connecting to Real Orca
- Start Orca desktop with WebSocket transport enabled
- In Orca, go to Settings > Mobile and scan the QR code with this app
- The QR encodes the connection endpoint, device token, and TLS fingerprint
Project Structure
mobile/
├── app/ # Expo Router screens (file-based routing)
│ ├── _layout.tsx # Root layout with navigation stack
│ ├── index.tsx # Home screen — paired hosts list
│ └── pair-scan.tsx # QR code scanning screen
├── src/
│ └── transport/ # WebSocket RPC client (TBD)
├── scripts/
│ └── mock-server.ts # Standalone mock WebSocket server
└── assets/ # App icons and splash screen