A native iOS chat app for communicating with your OpenClaw assistant.
OpenClaw is a personal AI assistant platform. Clawline gives you a dedicated mobile interface to chat with your OpenClaw instance — with slick native animations and media support.
- Native SwiftUI interface with smooth animations
- Real-time WebSocket messaging
- Media attachments (images, documents)
- Markdown rendering in messages
- Typing indicators
- Dark mode support
- Token-based authentication
- Xcode: 26.0 or later
- iOS: 26.0 or later (iPhone and iPad)
- Swift: 5.0
- macOS: Sequoia 15.0+ (for development)
- Install Xcode from the Mac App Store or Apple Developer
- Clone this repository:
git clone https://github.com/clicketyclackety/clawline.git cd clawline
-
Open the Xcode project:
open ios/Clawline/Clawline.xcodeproj
-
Select your target device or simulator
-
Build and run (⌘R)
Clawline connects to an OpenClaw provider via WebSocket. To pair:
- Launch the app
- Enter your provider URL (e.g.,
https://your-openclaw-instance.example.com) - Complete the pairing flow with your provider's approval
clawline/
├── ios/Clawline/ # iOS app (Swift/SwiftUI)
│ ├── Clawline/
│ │ ├── Models/ # Data models (Message, Attachment, etc.)
│ │ ├── Views/ # SwiftUI views
│ │ ├── ViewModels/ # Observable view models
│ │ ├── Services/ # Chat service, upload service
│ │ ├── Networking/ # WebSocket client
│ │ ├── DesignSystem/ # Theme, components, flow layout
│ │ └── Protocols/ # Service protocols for DI
│ └── ClawlineTests/ # Unit tests
├── src/ # Standalone React/Vite web client
├── dist/ # Built web client output after npm run build
├── docs/ # Protocol docs, design notes, SOPs
└── shared/ # Assets, icons, API specs
- Client-specific implementations: iOS stays native Swift/SwiftUI; the browser client is a standalone React/Vite app, not a cross-platform shell.
- Protocol-oriented: Shared provider contracts keep clients aligned while each platform owns its UI/runtime shape.
- Reactive: SwiftUI observation on iOS; React state/store ownership on web.
- Offline-resilient: Automatic reconnection with exponential backoff.
| Component | Description |
|---|---|
ChatViewModel |
Main state container for chat UI |
ProviderChatService |
WebSocket connection and message handling |
MessageFlowCollectionView |
UIKit collection view with flow layout |
MessageBubble |
SwiftUI bubble with markdown support |
ChatFlowTheme |
Typography, colors, and layout metrics |
Clawline uses a WebSocket-based protocol with JSON messages:
auth— Authentication with tokenmessage— Chat messages (user/assistant)ack— Message delivery confirmationevent— Activity signals (typing indicators)error— Error responses
See docs/architecture.md and docs/ios-provider-connection.md for the current protocol details.
This repository also contains the standalone React/Vite web client in src/ with its build output in dist/.
npm install
npm run build
npm run preview -- --host 0.0.0.0 --port 4173The web client is a separate browser app service. It should not be installed under OpenClaw or served from the Clawline provider /www route on port 18800; it connects to the provider API/WebSocket instead. See docs/sop/clawline-web-hosting.md.
See CONTRIBUTING.md for development setup, coding standards, and contribution guidelines.
Trunk-based development — all work lands on main directly.
- Coding agents each get an isolated git worktree (clean from
HEAD), each on its own branch - Agents commit in their worktree and push to
origin/mainas they work - Conflicts stay small because everyone integrates continuously
~/src/clawline/remains the canonical deployer baseline; create agent worktrees under~/src/worktrees/(for example:git worktree add ~/src/worktrees/clawline-{agent-name} -b {agent-name}) and tear them down withgit worktree remove
Legacy note: workspaces created before 2026-02-14 used cp -r, so old ~/src/clawline-{name}/ directories may still exist as full repo copies (not worktrees). If you are in one, do not panic. Commit/push unstaged changes only when they are your own work; if they were inherited from a different agent, do not commit them and flag the owner to resolve. Then continue with worktree-based flow.
main is always moving and may contain unverified work. Tags mark stable points.
mainHEAD = latest code (may be incomplete or untested on device)- Latest tag = last verified-good build, tested on device
To get stable code:
# Latest tagged release
git checkout $(git describe --tags --abbrev=0)Tags are created after on-device verification: git tag v{YYYY-MM-DD} (or a descriptive name).
cd ios/Clawline
xcodebuild test -scheme Clawline -destination 'platform=iOS Simulator,name=iPhone 16'MIT — see LICENSE for details.
- Design inspired by modern chat interfaces