An unofficial, open-source Android client for OpenCode — run AI coding agents on your phone or connect to a remote PC.
OpenCode Android does not fork OpenCode. It uses the same REST/SSE API to talk to either an on-device runtime (Alpine Linux + OpenCode binary via PRoot) or a remote opencode serve instance on your PC/Mac/Linux.
Important
This is not an official OpenCode project.
- On-device runtime — Alpine Linux, Git, bash, curl, ripgrep, and OpenCode auto-installed on your Android device via PRoot
- Remote connection — Connect to OpenCode running on your PC/Mac/Linux over LAN or Tailscale
- Runtime switching — Seamlessly switch between local and remote execution, even mid-conversation (handoff)
- Dynamic models — Models, providers, and agents fetched live from your OpenCode instance
- Session management — Create, resume, rename, and delete sessions
- Discovery — Find PCs via QR code or mDNS (zero-config LAN discovery)
- Real-time streaming — SSE-based live responses, tool execution, and approval requests
- Structured timeline — Collapsible reasoning, tool calls, and command output
- Approval flow — Approve or reject dangerous tool operations
- Voice input — Push-to-talk with Android speech recognition + wake word detection
- Text-to-speech — Read responses aloud
- Digital assistant — Register as Android's default assistant (home gesture / corner swipe)
- Secure storage — Connection credentials encrypted with Android Keystore
- Bilingual — English and Japanese UI
| Screen | Description |
|---|---|
| Home | Current runtime, model, agent, recent sessions |
| Chat | Conversation with collapsible reasoning/tools, voice input, model switching, approvals, handoff |
| Workspaces | Local runtime, PC connections, working folders |
| History | Running tasks, pending approvals, sessions, event log |
| Settings | Home assistant, TTS, continuous conversation, configuration |
- Install the APK from Releases
- Open the app → Workspaces → This Android device → Set up on this device
- Wait for the runtime to download and install (~2 min on a good connection)
- Start chatting with your AI coding agent
- Start OpenCode on your PC:
OPENCODE_SERVER_PASSWORD='your-strong-password' \
opencode serve --hostname 0.0.0.0 --port 4096 --mdns- Install the APK on your Android device
- Open the app → Workspaces → Add connection
- Enter your PC's IP (or use LAN search / QR code for auto-discovery)
Name: Mac mini
URL: http://192.168.1.10:4096
Username: opencode
Password: your-strong-password
Tailscale works too:
http://100.x.y.z:4096orhttp://your-mac.tailnet-name.ts.net:4096
Generate a QR code on your PC:
npx qrcode "opencode://connect?name=Mac%20mini&url=http%3A%2F%2F192.168.1.10%3A4096&username=opencode&password=your-password&insecure=true"Then scan it from Workspaces → Add via QR in the app.
- Never expose port 4096 directly to the internet
- Use LAN or Tailscale for connectivity
- Use an HTTPS reverse proxy on public networks
- The app never auto-approves dangerous operations
- Plaintext HTTP on LAN requires explicit per-connection opt-in
The setup process (triggered from Workspaces):
- Verifies the native PRoot runner bundled in the APK
- Downloads Alpine Linux minirootfs from the official CDN
- Downloads the OpenCode musl binary from GitHub Releases
- Validates SHA-256 checksums for both
- Extracts to a private app directory
- Installs Git, bash, curl, ripgrep, and CA certificates inside Alpine
- Starts the OpenCode server on
127.0.0.1:4097 - Switches the app to the local runtime
Pinned versions (updatable via app releases without OpenCode changes):
- Alpine Linux 3.24.1
- OpenCode 1.18.3
- Architectures: arm64-v8a, x86_64
From the chat header menu → Continue on another runtime — the app generates a conversation summary prompt and sends it to the selected runtime, letting you pick up where you left off (e.g., start on-device while commuting, continue on your PC at home).
Add server config to ~/.config/opencode/opencode.json:
{
"server": {
"port": 4096,
"hostname": "0.0.0.0",
"mdns": true
}
}Restart the desktop app, then discover it from the Android app via LAN search.
Requirements: JDK 17, Android SDK, Python 3, network access (first build only)
./gradlew testDebugUnitTest lintDebug assembleDebug assembleReleaseOutput APKs:
app/build/outputs/apk/debug/app-debug.apk
app/build/outputs/apk/release/app-release-unsigned.apk
Install to device:
adb install -r app/build/outputs/apk/debug/app-debug.apkContributions are welcome! Please see CONTRIBUTING.md for guidelines.
Runtime generation reuses generic Termux package resolution/extraction logic redesigned for OpenCode, inspired by the MIT-licensed Hermes Agent Android implementation. See THIRD_PARTY_NOTICES.md for details.