# ZenCODE: an open-source coding agent in Swift with Xcode and SwiftPM tools

**URL:** <https://forums.swift.org/t/zencode-an-open-source-coding-agent-in-swift-with-xcode-and-swiftpm-tools/90323>\
**Category:** Community Showcase\
**Tags:** linux, macos\
**Created:** [October 29, 2026, 12:11am UTC](https://forums.swift.org/t/zencode-an-open-source-coding-agent-in-swift-with-xcode-and-swiftpm-tools/90323 "2026-10-29T00:11:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerardogrisolini](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/gerardogrisolini/32/47136_2.png) [@gerardogrisolini](https://forums.swift.org/u/gerardogrisolini)\
**Post date:** [October 29, 2026, 12:11am UTC](https://forums.swift.org/t/zencode-an-open-source-coding-agent-in-swift-with-xcode-and-swiftpm-tools/90323/1 "2026-10-29T00:11:42Z")

</div>

Hi everyone,

I'd like to share **ZenCODE** , an open-source (MIT) coding agent I've been building in Swift 6. It runs in the terminal or as an Agent Client Protocol (ACP) agent inside editors, and it ships as a single native `zen` executable for macOS, Linux, and Windows via WSL (it also runs on a Raspberry Pi).

### What may be interesting for Swift developers

- **Xcode integration.** ZenCODE connects to Xcode 27 over ACP as a coding agent. The optional `xcode-tools` package bridges Xcode's own MCP server (`xcrun mcpbridge`), so the agent can use `BuildProject`, `RunAllTests` / `RunSomeTests`, `GetBuildLog`, `RenderPreview`, and `DocumentationSearch` on the open project instead of calling `xcodebuild` directly.
- **SwiftPM tools.** The `swift-tools` package runs `swift build` and `swift test` with arguments passed as argv, without shell interpretation, so the agent can build and test a package before it reports back.
- **Extensible in Swift.** Optional tools are standalone SwiftPM packages written against a small `FeatureKit` / `ToolCore` API and compiled on your machine. The built-in Builder agent (`/feature`) can generate a new feature package for you, which then becomes a durable tool.
- **Sub-agents.** `/plan`, `/goal`, and `/review` split work across specialised sub-agents, each bound to the model you pick for that capability. While they run, they coordinate in a shared chat that you can join from the terminal (`@coordinator`, `@all`).

### Models

Any OpenAI-compatible endpoint, a browser sign-in with an existing ChatGPT or Claude subscription, or a local DS4 model running in-process.

### Status

The latest release is v3.1.0. The install scripts build from source with Swift 6.4 (macOS 26 on Apple silicon, or Linux/WSL, where the script can install the toolchain with Swiftly). Prebuilt archives are also available for macOS arm64 and Linux x86\_64 / arm64; the Linux ones need the Swift 6.4 runtime. The test suite uses Swift Testing.

Repository, docs, and a short demo GIF: [GitHub - gerardogrisolini/ZenCODE: Native-Swift coding agent for the terminal and ACP. One binary, no Node runtime — customizable tools, parallel agentic workflows with capability-based model bindings. macOS, Linux, and WSL, down to a Raspberry Pi. · GitHub](https://github.com/gerardogrisolini/ZenCODE)

Feedback is very welcome, especially from people who work in Xcode or on Linux every day, and from anyone who would like to write a feature package.

_Disclosure: I'm the author of ZenCODE._

---

<div class="post-metadata">

**Author:** ![Lin](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/lin/32/44031_2.png) [@Lin](https://forums.swift.org/u/Lin)\
**Post date:** [October 29, 2026, 4:08am UTC](https://forums.swift.org/t/zencode-an-open-source-coding-agent-in-swift-with-xcode-and-swiftpm-tools/90323/2 "2026-10-29T04:08:43Z")

</div>

every cool, thanks for sharing

---

<div class="post-metadata">

**Author:** ![gerardogrisolini](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/gerardogrisolini/32/47136_2.png) [@gerardogrisolini](https://forums.swift.org/u/gerardogrisolini)\
**Post date:** [November 9, 2026, 10:21pm UTC](https://forums.swift.org/t/zencode-an-open-source-coding-agent-in-swift-with-xcode-and-swiftpm-tools/90323/3 "2026-11-09T22:21:04Z")

</div>

Quick update for anyone who tried ZenCODE after this post: several releases have landed since v3.1.0, and v5.0.0 is out today.

**Native macOS app (4.0).** `zen --ui` opens a SwiftUI app (macOS 26) with the same sessions, agents, tools and settings as the terminal: one window per workspace, a sidebar with the files each turn changed and their diffs, and a live tab for each sub-agent. It is built from source on first launch, so it needs the Swift toolchain.

**Public Swift API (4.0).** The terminal, ACP and the app now share one chat-session core, and it is public: an app that imports `ZenCODECore` can host a session with `ChatSessionHost` and observe a `ChatSessionSnapshot`, under semantic versioning. Details: [ZenCODE/Docs/embedding.md at v5.0.0 · gerardogrisolini/ZenCODE · GitHub](https://github.com/gerardogrisolini/ZenCODE/blob/v5.0.0/Docs/embedding.md)

**Telegram (4.0).** `/telegram on` hands the current session (terminal, Xcode or another ACP client, or the app) to a linked Telegram chat, where you can also approve tools; `/telegram off` takes it back.

**Xcode (4.1).** Every tool call shows its target and elapsed time, also in Xcode, where the title of a completed call ends with it (`Read file · 1.25s`).

**Git worktrees (5.0).** `zen --worktree NAME` runs the session on branch `NAME` in a separate worktree that shares the project's memory and saved sessions; when the chat ends it offers to merge the branch and remove the worktree.

Heads-up if you installed an earlier version: 5.0 is a breaking release. Setup is now only `zen --setup` (the `/setup` command is gone), and an ACP client that relied on `ZENCODE_AGENT_MODE` must pass `--acp`.

Release notes: [Release ZenCODE v5.0.0 · gerardogrisolini/ZenCODE · GitHub](https://github.com/gerardogrisolini/ZenCODE/releases/tag/v5.0.0)

Feedback is still very welcome, especially on the Xcode integration and the embedding API.

---

<div class="post-metadata">

**Author:** ![Lin](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/lin/32/44031_2.png) [@Lin](https://forums.swift.org/u/Lin)\
**Post date:** [November 9, 2026, 10:23pm UTC](https://forums.swift.org/t/zencode-an-open-source-coding-agent-in-swift-with-xcode-and-swiftpm-tools/90323/4 "2026-11-09T22:23:27Z")

</div>

very elegant I like the tui and gui decouple
