TL;DR

AgentSwift is a small, open-source native macOS app that runs an autonomous Claude-powered coding agent against your Xcode project. You type what you want to build, and it discovers your project structure, edits source files, runs xcodebuildmcp to compile, boots a simulator (or macOS), runs UI automation to validate the result, and stops. No Cursor sidebar. No terminal. No Xcode chat panel. Just a SwiftUI window driving an agentic loop.

Key facts:

  • Open source on GitHub at hpennington/agentswift — Show HN debut at 63 points, ~10 comments, indie weekend project
  • Native SwiftUI macOS app — pure SwiftUI + Foundation, no external Swift dependencies
  • Built on two MCPs: xcodebuildmcp (Sentry’s iOS/macOS build + UI automation server) and @fission-ai/openspec (cross-session implementation specs)
  • Five-phase loop: Discover → Implement → Build → Launch/Validate → Archive
  • Claude Opus 4.7 or Sonnet 4.6 via your own Anthropic API key
  • macOS 26.1+ required — uses recent SwiftUI and the new sandboxed simulator hooks
  • Honest framing from the author: “I hacked it together in a weekend, it’s not that serious. The goal is something closer to Replit for native Swift than Claude Code.”

If you write iOS apps and you’ve watched Claude Code spin in your terminal trying to figure out which scheme to build, AgentSwift is the missing native shell — a focused single-window tool that knows about Xcode schemes, simulator IDs, and UI tests, and uses that knowledge to keep the agent on rails.

Quick Reference

FieldValue
Repogithub.com/hpennington/agentswift
LicenseOpen source (see repo)
LanguageSwift / SwiftUI
PlatformmacOS 26.1+
Target outputiOS apps, macOS apps (any Xcode project)
ModelClaude Opus 4.7 / Sonnet 4.6
Latest releaseAgentSwift-0.2.4.zip (binary download in repo)
Underlying MCPsxcodebuildmcp, openspec
External Swift depsNone

Why a Native App When Claude Code Already Works?

The first response on Hacker News was the obvious one: “Why not just use Claude Code with the Xcode MCP server?” The author’s own answer: AgentSwift is closer in spirit to Replit for native Swift than to a general coding agent.

It is single-purpose. AgentSwift only knows iOS/macOS apps. Discovery looks for .xcodeproj and .xcworkspace, asks Xcode for schemes, picks a simulator, and remembers all of it. Claude Code has to be told this on every project via an AGENTS.md file, and it is only correct to the extent that file is well-written.

It is GUI-native. You see the build output, the simulator boot, and the UI automation run inside one SwiftUI window. The agent’s tool calls render as steps in a chat-like timeline.

The loop is hard-coded, not improvised. Claude Code, Cursor, and Codex are general agents that improvise their workflow. AgentSwift’s five phases are written into the app. The model fills in what to do at each phase; the order is fixed. This is the same trade-off Aider made versus Devin: less generality, fewer surprises.

Installing and First Run

AgentSwift ships as a downloadable zip in the repo (currently AgentSwift-0.2.4.zip). You can also clone the repo and build it yourself in Xcode — there are no external Swift packages to fetch.

# 1. Install the two CLIs the agent calls into
npm install -g xcodebuildmcp
npm install -g @fission-ai/openspec

# 2. Sanity-check both
xcodebuildmcp --version
openspec --version

# 3. Grab the latest AgentSwift
curl -L -o AgentSwift-0.2.4.zip \
  https://github.com/hpennington/agentswift/raw/refs/heads/main/AgentSwift-0.2.4.zip
unzip AgentSwift-0.2.4.zip
mv AgentSwift.app /Applications/
xattr -cr /Applications/AgentSwift.app  # clear quarantine on first launch

On first launch you open Settings, paste your Anthropic API key (from console.anthropic.com), and pick a Project Folder — the directory containing your .xcodeproj or .xcworkspace. Optionally choose an iOS Simulator target from the dropdown; if you skip it, AgentSwift will pick one in the discovery phase.

Then you write what you want, and press Cmd+Return:

Add a SwiftData model for Note(title, body, createdAt), an inbox view that lists them sorted by createdAt desc, and a “New” button that pushes a NoteEditView. Wire it up so creating a note returns to the inbox with the new row visible.

The first run is slower because AgentSwift runs Discover — it asks the project for schemes and the simulator list, picks targets, and caches everything. Subsequent runs skip discovery and start straight at Implement.

The Five-Phase Loop, Step by Step

The agentic loop is documented in the README and visible in the source:

1. Discover  — Claude inspects your Xcode project structure and schemes
2. Implement — edits source files to match your request
3. Build     — runs xcodebuildmcp to compile
4. Launch /  — boots the app on a simulator or macOS, runs UI automation
   Validate    to verify behavior
5. Archive   — marks the task complete

The interesting one is Validate. The author confirmed in the HN thread that AgentSwift uses xcodebuildmcp’s UI automation to actually drive the booted simulator — tap, type, scroll — and observe the UI state. That is a real difference versus the common “build + unit tests” loop, which only verifies that the app compiles and that pure-logic tests pass. If your request was “add a New button that pushes the editor”, AgentSwift can boot the app, find the New button, tap it, confirm a navigation event, and report back.

It is not screenshot-based vision (yet). The validation reads UI hierarchy, accessibility identifiers, and element states. So if your view has no accessibility identifier, the agent may not be able to find or tap it. The pragmatic fix is to ask the agent to add .accessibilityIdentifier("newNoteButton") modifiers to anything it intends to drive — and Claude does this naturally when prompted.

Reading the Source

For a tool you’ll let edit your codebase, the source is small enough to scan in 20 minutes:

AgentSwiftApp.swift    — app entry point
ContentView.swift      — UI, view models, agentic loop
AnthropicService.swift — Anthropic API client (streaming SSE)
ToolExecutor.swift     — bash / read_file / write_file execution
Item.swift             — chat message model

A few things worth knowing before you trust it on a real codebase:

  • ToolExecutor.swift runs raw shell commands scoped to your project folder. There is no allow-list, no diff-preview before write — the same trust model as Claude Code or Cursor, with fewer guardrails. Don’t point it at production secrets or repos with uncommitted irreplaceable work.
  • AnthropicService.swift streams SSE directly to the Anthropic API. Your key is stored in macOS Keychain and only sent to api.anthropic.com. No proxy, no telemetry.
  • Message queueing: a new message while the agent is running supersedes the earlier one. You can interrupt a misguided run with a new instruction.
  • Build caching: scheme, project path, and simulator ID are reused after the first successful build. Subsequent runs are noticeably faster.
  • Error escalation: on a build failure, the agent attempts one fix, then surfaces the error rather than looping. The right call — runaway loops are the worst failure mode for a code-editing tool.

A Concrete Workflow

Here’s the kind of request AgentSwift handles well: “Add a Settings tab with Appearance (System/Light/Dark) and a Reset onboarding button. Persist appearance in @AppStorage. Add a UI test that taps Reset and asserts onboarding shows.”

What happens, roughly:

[discover]  → schemes: [MyApp, MyAppTests, MyAppUITests]
            → picks scheme: MyApp, simulator: iPhone 17 Pro
[implement] → edits SettingsView.swift, MyApp.swift
            → adds MyAppUITests/SettingsTests.swift
[build]     → xcodebuildmcp build → ✓
[validate]  → boots iPhone 17 Pro → runs UI test → ✓
[archive]   → done. 4 files changed, 1 test added, 92s total

You see all of it in one window: chat timeline of tool calls, build pane with compiler output, and the simulator popping up for validation.

Community Reactions

Sampling the Show HN thread (63 points, indie launch) and the surrounding chatter:

  • The Claude-Code-already-does-this question came up first. Author: “The goal is something closer to Replit for native Swift than Claude Code.” That framing — single-purpose, GUI-first — is what differentiates this from a generic agent.
  • Validation depth: a commenter who’d built a similar app with Codex noted the agent “was booting the simulator and running tests to verify something — but couldn’t ‘see’ what was on the screen.” Another developer clarified that with xcodebuildmcp, AgentSwift drives real UI tests, not just unit tests, which is the missing capability.
  • Comparison to Opencode + Codex on a fresh Xcode project: one commenter reported that general agents “changed the Xcode project settings, no skills.md or agents.md or anything, no problem.” AgentSwift’s pitch is not “general agents can’t do it” — it’s “you don’t need to teach the agent your build system every time.”
  • Author candor: “This is a truly experimental project. I hacked it together in a weekend; it’s not that serious.” That is the right framing for a 0.2.x release. Treat it as a working prototype, not a production tool.

There is no big subreddit dogpile yet — this is a 6-day-old indie project. The signal-to-noise ratio in the HN thread is good: real iOS devs asking real questions about UI automation and project discovery.

Honest Limitations

Things you should know before adopting:

  • macOS 26.1+ only. The app uses recent SwiftUI and simulator APIs. Older macOS users are out of luck until back-deployment lands.
  • Anthropic-only. No OpenAI, no local models, no Gemini. If your team uses Codex or runs Llama on-prem, AgentSwift is not your tool.
  • No diff preview before write. The agent edits files directly. Use git as your safety net — commit before each run, review the diff after, revert if it went sideways.
  • UI automation depends on accessibility identifiers. If your views lack them, validation may silently no-op. Ask the agent to add identifiers to interactive elements.
  • Single-window app. No multi-project workspace, no parallel agents on different repos. One project at a time.
  • xcodebuildmcp is the floor on stability. AgentSwift is only as reliable as its underlying MCP server. xcodebuildmcp is maintained by Sentry and reasonably solid, but on edge-case Xcode setups (custom build phases, exotic schemes, CocoaPods + SPM hybrids) you may hit limits in the MCP, not the agent.
  • No CI mode. AgentSwift is a desktop app. There’s no headless agentswift run "..." --project ./MyApp for use in CI. If you want autonomous iOS dev in a pipeline, you’re back to Claude Code or your own MCP harness.
  • Weekend project disclaimer. The author has been clear: this is experimental. Bugs are likely. Expect the loop to occasionally do something dumb. The one-attempt error rule means it will surface the dumb thing rather than spiral, which is the right call.

AgentSwift vs. The Alternatives

ToolApproachStrengthWeakness
AgentSwiftNative macOS app, fixed 5-phase loopSingle-purpose iOS/macOS focus, real UI validation, GUI-firstmacOS 26.1+, Anthropic-only, weekend-project maturity
Claude Code + xcodebuildmcpGeneral CLI agent + same MCPMulti-language, mature, scriptable, CI-friendlyRequires AGENTS.md setup per project, terminal UX
Cursor + xcodebuildmcpIDE chat + MCPEditor diff-preview, multi-languageCursor is not Xcode, switching for non-Swift is awkward
Codex + Xcode CLIGeneral CLI agent, no MCPOpenAI ecosystem, multi-languageNo native simulator/UI test integration unless you wire it
Manual Xcode + Copilot/ClaudeSuggestion + you do the typingFull IDE features, no agent surprisesSlow on multi-file scaffolding

The niche is real but narrow: developers who write iOS/macOS apps daily, who want autonomous building and validation, and who are happy on Anthropic + macOS 26.1+. For everyone else, Claude Code with the same xcodebuildmcp server is a more general answer.

FAQ

Is AgentSwift a replacement for Xcode? No. You still need Xcode installed (it provides the simulator, the build toolchain, and the project formats AgentSwift reads). AgentSwift replaces the typing-in-Xcode part of Apple development for tasks where the agent can plan, edit, and validate end-to-end. You’ll still open Xcode for debugging, profiling, and detailed UI work.

How is this different from Claude Code with xcodebuildmcp? Claude Code is a general agent in a terminal that you teach about your project. AgentSwift is a single-purpose macOS app where the iOS workflow is hard-coded into the loop. If you’re already comfortable in Claude Code with AGENTS.md set up, you may not need AgentSwift. If you want a GUI-native, single-window experience built around Xcode’s mental model, AgentSwift is the cleaner fit.

Does AgentSwift work with SwiftUI, UIKit, or both? Both. The agent edits whatever Swift code is in your project. SwiftUI views are easier to drive via accessibility identifiers than legacy UIKit hierarchies, but UIKit works.

Can I use it with CocoaPods / SPM / Tuist? Yes for SPM and most CocoaPods setups. Tuist projects work if xcodebuildmcp can resolve the generated .xcworkspace. Hybrid SPM + CocoaPods projects are most likely to confuse discovery — override the scheme in the project settings dropdown if it picks wrong.

Is my Anthropic API key safe? The key is stored in macOS Keychain and only transmitted to api.anthropic.com over HTTPS. No telemetry, no proxy. You are running an unsigned indie binary; if you’re paranoid, build from source — the codebase is small enough to read.

How much does a typical run cost? Comparable to Claude Code on the same task. Discovery is one-time (~$0.05–0.15 on Sonnet). A “scaffold a Settings tab + UI test” implementation runs in the $0.20–$0.80 range on Sonnet 4.6, $1–$3 on Opus 4.7. The build/validate phases are tool-output reads; cost is dominated by the implement phase.

Can I use it on a team? Today it is a single-developer desktop tool. There is no shared cache, no centralized config, no CI mode. Multiple developers on a team can each install it and run it on their own checkouts, but the cached scheme/simulator config lives per-machine.

Verdict

AgentSwift is a sharply-scoped, native, weekend-project-maturity tool that does one thing well: drives Claude through a discover→implement→build→validate loop for Apple platform apps. The five-phase architecture is the right call — fixed scaffolding around a flexible model, with one-shot error escalation to keep cost and damage bounded.

It is not a Claude Code replacement. It is a Claude Code complement for developers whose default mental model is Xcode + Simulator, not iTerm + git. If that’s you, the GUI-first single-window experience is genuinely faster than wiring AGENTS.md and remembering MCP server flags.

For everyone else — multi-language teams, CI/CD users, non-Anthropic shops — Claude Code with the same xcodebuildmcp server is the more general answer, and AgentSwift’s deeper value may be the demonstration: that a small native app can wrap a general LLM, lock the workflow to a single domain, and produce a noticeably better UX than a terminal can. Expect more of these to ship in the next few months.

Worth installing if you write Swift daily. Worth watching even if you don’t.