Skip to content

Parham-dev/OpenClaw-ios

Repository files navigation

OpenClaw iOS

OpenClaw for iOS & macOS

A native control room for the OpenClaw AI gateway.
Monitor, trace, chat, and manage your agent — from your phone or Mac.

Swift 6 iOS 17+ macOS 14+ SwiftUI License Dependencies AI Generated Active Development


The Story

Hi, I'm Parham — Manchester-based software developer with 12+ years of experience. Technical Lead at Kitman Labs by day, OpenClaw and AI enthusiast by night. Manchester, UK

I've been deep in AI for the last three years, and OpenClaw genuinely impressed me — it was the missing piece for automating my workflows and being dramatically more productive. Here's one of my earlier cron schedules in Google Calendar (it's much crazier now):

OpenClaw Cron Schedule in Google Calendar

But as a technical person myself, I found the onboarding, setup, and control UI wasn't OpenClaw's best feature. The engine, the brain, how it works — that's extraordinary. The UX? Not so much.

Swift and iOS are my specialty, so I built this. The main reasons:

  • Tracing — cron runs get crazy in logs. Being able to drill down to any trace step and ask the agent to investigate a warning or error should be much easier than the web control UI
  • Comments on everything — see a memory file that needs updating? Comment on a paragraph. See a trace step that looks wrong? Comment on it. The agent reads your comments and acts. This is the missing piece
  • Mobile-first control — pull down to refresh, tap to investigate, chat with your agent while on the go

Demo

Watch Demo

Watch the 3-minute demo on Google Drive


Screenshots

Home Dashboard Cron History Memory & Skills

Execution Trace Sessions Schedule Timeline

Doctor Output


Features

Dashboard

Core cards: System Health (ring gauges, 15s polling), Commands (12 quick actions with parsed output + AI investigation), Cron Summary, Token Usage (charts, pipeline attribution). Optional cards (Outreach Stats, Blog Pipeline) appear automatically if the gateway provides those endpoints — hidden gracefully otherwise.

Cron Management

Full job list with status badges. Segmented Cron Jobs / History. 24-hour schedule timeline. Detail view with: purpose, model, schedule, stats (avg duration, tokens, success rate), paginated run history. One-tap "Investigate with AI" on errors.

Execution Traces

Step-by-step agent traces: system prompts, thinking, tool calls, tool results, responses. Metadata pills (model with provider icon, tokens). Comment on any step — queue comments, batch submit, agent investigates with full session context.

Memory & Skills

Browse all workspace files. Paragraph-level markdown viewer with Figma-style comments — annotate paragraphs, submit to agent for edits. Skills: browse folder trees, read SKILL.md with comments, view scripts/config read-only. Skill-level comments instruct agent to read create-skill best practices first. Maintenance actions: Full Cleanup, Today Cleanup.

Streaming Chat

SSE streaming chat with the orchestrator agent. Session-bound (server manages history). Chat bubbles with markdown, timestamps, copy. Auto-scroll, stop button, interactive keyboard dismiss.

Sessions

Main session hero card with context window ring gauge. Subagent list. Both link to execution traces.

Command Output Parsers

Custom parsed views for: Tail Logs (level-filtered structured entries), Security Audit (severity badges, collapsible findings with fixes), Doctor (collapsible sections, status lines), Status (table sections), Channel Status (probe cards). Raw monospace fallback for others.

Admin

Models & Config (provider icons, fallbacks, aliases). Channels (status dots, provider usage bars). Tools & MCP (native tool groups, MCP server detail with lazy-loaded tool lists). All 15 exec commands.


Getting Started

1. Set up the Stats Server skill on OpenClaw

The app communicates with your gateway through a stats server skill that needs to be installed first. This skill exposes the /stats/* endpoints and /stats/exec commands that the app depends on.

Just ask your agent:

"Set me up for the iOS app"

The skill-ios-setup skill will detect your environment, deploy the stats server, configure auto-restart, and walk you through exposing your gateway (nginx, Tailscale, or local network).

Install it first if you don't have it:

openclaw skills install skill-ios-setup

Available on ClawHub — search skill-ios-setup.

The skill provides:

  • GET /stats/system — system health (CPU, RAM, disk)
  • GET /stats/tokens — token usage analytics
  • POST /stats/exec — allowlisted command execution (doctor, logs, status, etc.)
  • All the admin commands (models-status, channels-list, tools-list, etc.)

Without this skill, only /tools/invoke and /v1/chat/completions endpoints will work. The dashboard cards and commands will show errors.

2. Configure the gateway

Add these settings to your openclaw.json:

{
  "tools": {
    "sessions": { "visibility": "all" },
    "profile": "full",
    "allow": ["exec", "cron", "gateway", "sessions_list", "sessions_history", "memory_get"]
  },
  "gateway": {
    "http": {
      "endpoints": {
        "chatCompletions": { "enabled": true }
      }
    }
  }
}

3. Build and run the app

  1. Clone this repo
  2. Open OpenClaw.xcodeproj in Xcode 16+
  3. Build and run on a simulator or device (iOS 17+)
  4. On first launch, enter your gateway URL (e.g. https://your-server.com:18789) and Bearer token
  5. The dashboard loads automatically — pull down to refresh

Security

All communication is direct between your phone and your gateway — no third-party servers, no telemetry, no data collection. Your Bearer token is stored in the iOS Keychain (never in UserDefaults or iCloud). The app makes authenticated HTTPS requests only to the gateway URL you configure. No one else sees your data.


Architecture

Clean Architecture with MVVM per feature. 135 files, ~11,000 lines.

View → LoadableViewModel<T> → Repository protocol → GatewayClientProtocol → URLSession
                                      ↓
                                 MemoryCache (actor, TTL)
  • Swift 6 concurrency: @Observable, @MainActor, strict Sendable
  • Design system: Spacing, AppColors, AppTypography, AppRadius, Formatters
  • Shared components: ModelPill, ProviderIcon, DetailTitleView, CommentSheet, CommentInputBar, CopyButton, ElapsedTimer, TokenBreakdownBar
  • One external dependency: MarkdownUI

See CLAUDE.md for the full architecture guide, conventions, and API gotchas.


API

All requests go to your configured gateway URL with Authorization: Bearer <token>.

Method Path Purpose
GET /stats/system CPU, RAM, disk, uptime
GET /stats/tokens?period= Token usage with model breakdown
POST /stats/exec Run allowlisted commands
POST /tools/invoke Gateway tool calls (cron, sessions, memory)
POST /v1/chat/completions Chat streaming (SSE) + agent prompts
Full command list

Action commands: doctor, status, logs, security-audit, backup, channels-status, config-validate, memory-reindex, session-cleanup, plugin-update

Workspace commands: memory-list, skills-list, skill-files, skill-read

Admin commands: models-status, agents-list, channels-list, tools-list, mcp-list, mcp-tools


AI-Generated

100% of the code in this repository was generated by AI (Claude Code). Every file, every view, every parser — written through conversation, not by hand. The architecture, patterns, and conventions were designed collaboratively but the implementation is entirely AI-authored.

Platforms

  • iOS 17+ — tab-based navigation, haptic feedback, interactive keyboard dismiss
  • macOS 14+ — sidebar navigation, native clipboard, resizable window (min 800x500)

Same codebase, same features. Platform differences handled with #if os(iOS) / #if os(macOS) guards (~30 lines total).

Roadmap

If this project gets enough traction, the long-term plan is to migrate to Kotlin Multiplatform (KMP) for shared data and business logic layers, expanding to more platforms:

  • iOS + macOS — SwiftUI (current, shipping)
  • Android — Jetpack Compose
  • Shared — Kotlin Multiplatform for networking, repositories, DTOs, and business logic

Future: Semantic Memory Search

The memory_search tool is available via /tools/invoke but requires an embedding provider (OpenAI, Google, Voyage, or Mistral API key) to be configured on the server. Once enabled, semantic search can be added to the Memory tab.

Contributing

Contributions are welcome. Please open an issue first to discuss what you'd like to change.

License

MIT


Built with Claude Code by Parham

Packages

 
 
 

Contributors

Languages