How beppe2880/opencode-mobile works
OpenCode Mobile is a native Android/iOS client for an existing OpenCode server. Users connect to a server, choose or resume a session, follow live agent work, and send prompts or answer permission and form requests; they can then inspect changes, files, and terminal output. The shared app sits above repositories and a generated API/network client. The README documents further branches including settings, usage, integrations, voice, widgets, and platform-specific background and sharing features. Several feature implementations were not sampled, so those branches are shown without inferred internal call chains.
Main entry points: Composer.kt Chat and composer · RemoteSessionRepository.kt Session repository · AppNavHost.kt App navigation · sessions Session list
Components 21
App and navigation
- Android entry
android/app/src/main/java/io/github/beppe2880/opencodemobile/MainActivity.kt - iOS entry
android/shared/src/iosMain/kotlin/io/github/beppe2880/opencodemobile/MainViewController.kt - App navigation
android/shared/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/navigation/AppNavHost.kt - Settings and themes
android/feature/settings/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/feature/settings
Sessions and chat
- Session list
android/feature/sessions/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/feature/sessions - Chat and composer
android/feature/chat/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/feature/chat/Composer.kt - Session domain
android/core/domain/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/core/domain - Usage statistics
android/core/data/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/core/data
Server and data
- Session repository
android/core/data/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/core/data/session/RemoteSessionRepository.kt - Saved servers
android/core/data/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/core/data/server/StoredServerRepository.kt - OpenCode client
android/core/network/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/core/network/OpenCodeClient.kt - Session API
android/core/api/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/api/apis/SessionApi.kt
Review and tools
- Diffs and files
android/feature/chat/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/feature/chat - Remote terminal
android/feature/terminal/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/feature/terminal - MCP connections
android/core/data/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/core/data/integration/RemoteIntegrationRepository.kt
Platform features
- Voice input
android/app/src/main/java/io/github/beppe2880/opencodemobile/voice/VoiceRecordingService.kt - Session notifications
android/app/src/main/java/io/github/beppe2880/opencodemobile/notifications/SessionMonitorService.kt - Session widgets
android/app/src/main/java/io/github/beppe2880/opencodemobile/widget/SessionsWidget.kt - Share-to-session
android/app/src/main/java/io/github/beppe2880/opencodemobile/share/ShareActivity.kt
Other components
- Phone user
- OpenCode server
Connections 25
- Phone user → Android entry: opens app
README.md - Phone user → iOS entry: opens app
README.md - Android entry → App navigation: hosts
android/app/src/main/java/io/github/beppe2880/opencodemobile/MainActivity.kt - iOS entry → App navigation: hosts
android/shared/src/iosMain/kotlin/io/github/beppe2880/opencodemobile/MainViewController.kt - App navigation → Session list: shows sessions
- App navigation → Chat and composer: opens session
- Session list → Session repository: loads sessions
- Chat and composer → Session repository: sends prompts
- Chat and composer → Session domain: uses models
android/feature/chat/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/feature/chat/ChatPreview.kt - Session repository → OpenCode client: uses client
android/core/data/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/core/data/session/RemoteSessionRepository.kt - Session repository → Session API: calls sessions
android/core/data/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/core/data/session/RemoteSessionRepository.kt - OpenCode client → OpenCode server: requests data
- Session API → OpenCode server: HTTP requests
android/core/api/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/api/apis/SessionApi.kt - Saved servers → OpenCode client: configures connection
- Chat and composer → Diffs and files: supports review
README.md - Chat and composer → Remote terminal: opens terminal
README.md - App navigation → Settings and themes: opens settings
- Settings and themes → Chat and composer: previews chat
- Settings and themes → Session list: previews sessions
- Session repository → Usage statistics: provides activity
android/core/data/src/commonMain/kotlin/io/github/beppe2880/opencodemobile/core/data/session/RemoteSessionRepository.kt - Chat and composer → MCP connections: manages MCP
README.md - Chat and composer → Voice input: dictates prompts
README.md - Session repository → Session notifications: monitors sessions
- Session list → Session widgets: surfaces sessions
README.md - Android entry → Share-to-session: handles shared content
android/app/src/main/java/io/github/beppe2880/opencodemobile/MainActivity.kt