Skip to content

jackwener/opencode-ios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCode iOS

A modern, native iOS client for OpenCode — an AI coding assistant that runs in your terminal.

OpenCode iOS Icon

Features

  • 💬 Chat Interface — Real-time conversation with AI coding assistants via SSE streaming
  • 🛠️ Tool Execution — View tool calls (bash, file read/write, web fetch, patches) with expandable detail cards
  • 📁 File Browser — Explore project files, view code with syntax highlighting, and navigate diffs
  • 🔀 Session Management — Create, switch, and rename sessions with a ChatGPT-style slide-out drawer
  • 🎨 Modern Design — Unified design system with branded colors, material backgrounds, and smooth animations
  • 📱 Universal — Optimized for both iPhone and iPad (split view on iPad)
  • 🌐 Multi-language — English & Chinese localization

Screenshots

Coming soon

Requirements

  • iOS 17.0+
  • Xcode 15.0+
  • An OpenCode server running somewhere accessible

Getting Started

1. Install XcodeGen

brew install xcodegen

2. Generate Xcode Project

xcodegen generate

3. Open in Xcode

open OpenCode.xcodeproj

4. Build & Run

Select your target device/simulator and press ⌘R.

5. Configure Server

In the app's Settings tab, enter your OpenCode server URL, username, and password.

Project Structure

Sources/
├── App/                    # App entry point
├── Models/                 # Data models (Session, Message, Part, etc.)
├── Services/               # API client & SSE streaming
├── Utils/                  # Theme, localization, path utilities
└── Views/
    ├── Chat/               # Chat UI (messages, toolbar, input, tools)
    ├── ContentView.swift   # Root layout (tab/split)
    ├── FileTreeView.swift  # Project file browser
    ├── FileContentView.swift # File viewer with code/image/markdown
    └── SettingsTabView.swift # Server & appearance settings

Tech Stack

  • SwiftUI — Declarative UI framework
  • XcodeGen — Project generation from project.yml
  • MarkdownUI — Rich markdown rendering in chat messages
  • SSE — Server-Sent Events for real-time streaming

Design System

The app uses a centralized design system defined in Theme.swift:

Token Usage
AppTheme.primary Brand indigo-blue
AppTheme.accent Purple accent
AppTheme.success/warning/danger Semantic status colors
AppTheme.sendButtonGradient Send button gradient
.cardStyle() Material card with shadow
.floatingToolbar() Blurred toolbar background

License

Apache License 2.0 — see LICENSE for details.

About

A modern, native iOS client for OpenCode — AI coding assistant

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages