git.iko.soy/opencode-android
on e37d1bb help sign in
git clone ssh://git.iko.soy/opencode-android

opencode-android

A native Android client (Kotlin + Jetpack Compose) for the opencode serve HTTP API.

Application id: soy.iko.opencode

Status

Milestones M0–M7 complete:

Architecture

Source map: data/network (Ktor, SSE, JSON), data/model (wire models), data/repo (reducer + profile persistence), di (container/connection), ui/<feature> (Compose screens).

Build

nix develop              # JDK 17, Gradle 8.14.4, Android SDK 35, aapt2 override
./gradlew assembleDebug  # -> app/build/outputs/apk/debug/app-debug.apk
./gradlew assembleRelease  # R8-minified + resource-shrunk release APK
./gradlew testDebugUnitTest   # JVM tests for the JSON/serialization layer

Install & run

adb install -r app/build/outputs/apk/debug/app-debug.apk
adb shell am start -n soy.iko.opencode/.MainActivity
adb logcat --pid=$(adb shell pidof soy.iko.opencode)

Connect to a server

On the dev host:

opencode serve --hostname 0.0.0.0 --port 4096

In the app, add a server with base URL http://<host-lan-ip>:4096. If the host is reachable only over USB, use adb reverse tcp:4096 tcp:4096 and point the app at http://127.0.0.1:4096.

Auth is optional: opencode has no auth by default. If the server runs with OPENCODE_SERVER_PASSWORD=..., enter username opencode (the default) and that password — the app sends HTTP Basic auth. The app permits cleartext HTTP (opencode serves plain http://).