Skip to content

grapeot/opencode_ios_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

381 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCode iOS Client

A native iOS, iPadOS, and visionOS client for OpenCode. Connect to your OpenCode server from your iPhone, iPad, or Apple Vision Pro to chat with AI agents, monitor tool calls in real time, and browse code changes on the go.

Install via TestFlight

Don't want to build from source? Join the TestFlight beta:

https://testflight.apple.com/join/2cWrmPVq

No Apple Developer account needed. Just tap the link on your iOS device.

Features

  • Chat: send messages, switch models, view AI replies with streaming, inspect tool calls and reasoning
  • Files: file tree browser, session diffs, markdown preview, image preview with zoom/pan, code view with line numbers
  • Settings: server connection, Basic Auth, SSH tunnel, theme, voice transcription

Apple Vision Pro support

The main OpenCodeClient target builds as a single native app for iPhone, iPad, and Apple Vision Pro. On visionOS it reuses the existing iPad-style three-column NavigationSplitView layout: sidebar, file preview, and chat. It deliberately avoids the iPhone tab-based layout.

Current visionOS baseline limitations:

  • SSH tunnel settings are hidden and SSH tunneling is not available. Connect directly to a LAN or HTTPS OpenCode server instead.
  • Markdown rendering uses pinned SPM forks of MarkdownUI and NetworkImage (see Building from Source below). Those forks carry the minimal manifest / platform support changes so the same renderer builds for iOS, iPadOS, and visionOS.

Hardware keyboard behavior on iPad

  • Enter: insert a newline
  • Send: use the circular arrow button on the right side of the composer
  • Chinese/Japanese IME composition is allowed to commit marked text normally

Requirements

  • iOS 17.0+ or visionOS 26.0+
  • A running OpenCode server (opencode serve or opencode web)
  • Xcode 16+ (only if building from source)

Quick Start

  1. Start OpenCode on your Mac: opencode serve --port 4096
  2. Open the iOS app, go to Settings, enter the server address (e.g. http://192.168.x.x:4096)
  3. Tap Test Connection
  4. Switch to Chat, create or select a session, and start talking

Remote Access

The app is designed for LAN use by default. Two options for remote access:

HTTPS + public server (recommended): deploy OpenCode on a public server with TLS. Point the iOS app to https://your-server.com:4096 and configure Basic Auth credentials.

SSH Tunnel: the app has a built-in SSH tunnel (powered by Citadel). Set up a reverse tunnel from your home machine to a VPS, then configure the tunnel in Settings > SSH Tunnel. See docs/ for detailed steps.

Repository layout

This repo ships only the iOS/visionOS app and its docs/scripts. Large local-only directories are gitignored:

Path In git Purpose
OpenCodeClient/ yes Xcode project, app sources, unit/UI tests
docs/ yes PRD, RFC, API notes, working notes
scripts/ yes One-off maintenance scripts
opencode-official/ no Optional local checkout of upstream OpenCode server for integration testing
.venv/ no Python venv for scripts/
OpenCodeClient/build/, DerivedData/ no Xcode build artifacts

opencode-official/ is optional. Clone it only when you need to build or patch the server alongside the client. See docs/WORKING.md for the default rebase-on-origin/dev workflow.

Building from Source

git clone https://github.com/grapeot/opencode_ios_client.git
cd opencode_ios_client/OpenCodeClient
open OpenCodeClient.xcodeproj

Select the OpenCodeClient scheme, then pick an iPhone, iPad, or Apple Vision Pro destination. The same scheme and bundle identifier are used across iOS, iPadOS, and native visionOS, so TestFlight/App Store distribution remains a single app. Swift Package dependencies resolve automatically on first build.

This repo uses pinned forked Swift Package dependencies for Markdown rendering on visionOS:

  • https://github.com/grapeot/swift-markdown-ui, exact 2.4.1-visionos.1
  • https://github.com/grapeot/NetworkImage, exact 6.0.1-visionos.1

Those forks contain the minimal package manifest and placeholder-image changes needed for visionOS while the upstream packages do not advertise visionOS support.

For native visionOS, build the shared OpenCodeClient scheme with an Apple Vision Pro destination:

xcodebuild -project "OpenCodeClient.xcodeproj" \
  -scheme "OpenCodeClient" \
  -destination 'platform=visionOS Simulator,name=Apple Vision Pro' \
  CODE_SIGNING_ALLOWED=NO build

License

MIT

About

Native iOS client for OpenCode. AI coding agent on your phone

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors