DeepSeek Harness’s plugin-based architecture allows developers to manage local environments through tool links. For iOS/macOS developers, executing xcodebuild directly within an agent workflow is often not intuitive and may lose context. The dsh-xcodebuild plugin connects Xcode’s build, test, debugging, and log streaming to DeepSeek Harness’s conversation flow via a set of model-friendly tools.
Plugin Positioning¶
This is a DeepSeek Harness client plugin running on macOS, focusing on the build and development loop for iOS and macOS projects. It is maintained by harde1 and licensed under the MIT license. Core plugin features include build, test, clean, archive, run, and real-time filterable build log streaming.
Core Features¶
The plugin provides the following seven tools for agent invocation:
- xcode_doctor: Checks the machine environment status, lists missing tools and provides installation commands, and displays the Xcode version currently in use. This tool should be run first when a device cannot be installed to or launched on.
- xcode_project: Automatically detects the project (
.xcworkspace,.xcodeproj,Package.swift) and lists all schemes, configurations, and targets. - xcode_destinations: Merges multiple data sources (
-showdestinations,xcdevice,devicectl, etc.) and lists all available device destinations, including simulators, My Mac, hardware devices, and USB devices. Each entry includes the available destination string and recommended device. - xcode_run: Executes build, test, clean, archive, and run operations. It streams the full log output to a background run and collects compilation errors. It uses
simctlfor simulators,devicectlfor devices known to CoreDevice, andideviceinstaller+ios-deployfor iOS 16 and earlier. - xcode_log: Views run logs. Supports buffered
tail, incremental slicing by line number, or regular expression filtering. Calling this tool during a build is safe. - xcode_lldb: Debugs the application. Supports viewing the view hierarchy (generating a
.lookinfile for Lookin.app), running raw LLDB commands (such aspo,bt), and managing LLDB sessions (attach, interrupt, detach, status). For iOS 16 and earlier, connection must be made through the debugserver port forwarded bypymobiledevice3. - xcode_device_log: Reads logs from a simulator or physical hardware. For iOS 16 and earlier, it can read log files in the crash log directory within the app sandbox.
Typical Usage¶
In an agent workflow, you can complete a standard development loop using the following steps:
- Environment diagnosis: First call
xcode_doctorto ensure the machine has Xcode and related dependencies installed. - Project detection: Call
xcode_projectto get the project structure, schemes, and targets in the current working directory. - Device selection: Call
xcode_destinationsto list available devices and select the target for the build. - Run the build: Call
xcode_runto execute build, test, or run. This operation triggers automatic opening of the sidebar panel and log streaming. - Log inspection: Call
xcode_logto view build output in real time, or callxcode_device_logto view device logs. - Debugging and fixing: If you encounter a crash or specific issue, call
xcode_lldbto debug, or modify the code directly and repeat steps 3-5.
Interaction and Panel¶
The plugin displays build status and logs through a panel. By default, the panel opens automatically (controlled by the dsh-xcodebuild:autoOpen key in localStorage).
- Sidebar integration: If
dsh-better-sidebaris installed, the panel is integrated as a tab in the right sidebar; otherwise, it appears as a tab in the native Shell right sidebar, or as a floating window when no sidebar is present. - Automatic opening for AI calls: The panel automatically focuses during operations such as build and run. AI calls (such as viewing logs or LLDB operations) do not take over the screen, but are recorded in the AI strip of the panel.
Notes¶
- System limitation: The plugin supports macOS only.
- Dependencies: To use
xcode_lldbfor debugging iOS 16+ devices,pymobiledevice3must be installed. - License: The plugin code is open source under the MIT license. Review the source code before use to ensure it meets project requirements.
Summary¶
dsh-xcodebuild provides DeepSeek Harness with a complete closed-loop Xcode development capability. By standardizing tools for build, test, logs, and debugging, developers can let the agent directly handle everyday iOS/macOS development tasks and reduce manual operations.