xcode

A command interface for controlling Apple Xcode, including project status, building, testing, running, cleaning, stopping, and listing schemes.

In plain words
What is it for?
Use it to build, test, run, clean, and inspect iOS or macOS projects and their available build schemes.
Why use it?
It gives the coding agent a consistent way to perform common Xcode tasks and report build or test results.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/marcelrgberger/xcode-cli/xcode
Clone the repo
git clone --depth 1 https://github.com/marcelrgberger/xcode-cli
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 838 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00042 $0.00838
Opus 5 $0.00021 $0.00419
Sonnet 5 $0.00008 $0.00168
Haiku 4.5 $0.00004 $0.00084

Measured yesterday against content hash 39721d503b1e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

xcode scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/xcode.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Xcode CLI — Quick Access

You have access to the Xcode CLI (xcode-cli).

Step 0: Ensure CLI is available

Check if xcode-cli is installed. If not, install it automatically:

which xcode-cli || (cd ${CLAUDE_PLUGIN_ROOT}/agent-harness && python3 -m venv .venv && source .venv/bin/activate && pip install -e . && echo "xcode-cli installed")

If a venv already exists, activate it:

test -f ${CLAUDE_PLUGIN_ROOT}/agent-harness/.venv/bin/activate && source ${CLAUDE_PLUGIN_ROOT}/agent-harness/.venv/bin/activate

Your task

Parse the argument $ARGUMENTS and execute the matching action:

If no argument or "status":

xcode-cli --json session status

Display Xcode status (running, active scheme, destination).

If "build":

xcode-cli --json build build

Report success/failure, error count, warning count.

If "test":

xcode-cli --json build test

Report test results, failures.

If "run":

xcode-cli --json build run

Confirm the app is running.

If "clean":

xcode-cli --json build clean

If "stop":

xcode-cli --json build stop

If "schemes":

xcode-cli --json workspace schemes

Display schemes in a clear list.

If "destinations":

xcode-cli --json workspace destinations

If "simulators":

xcode-cli --json simulator list --available

Display available simulators.

If "devices":

xcode-cli --json device list

If "open ":

xcode-cli --json workspace open "<path>"

Open the workspace/project and show its schemes.

If "errors":

xcode-cli --json build errors

If "warnings":

xcode-cli --json build warnings

If "test-failures":

xcode-cli --json build test-failures

If "log":

xcode-cli --json build log

If "archive":

xcode-cli --json build archive --scheme "<scheme>" --output "<path>"

After opening a workspace

Read the full file on GitHub · 135 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 135 lines · 42 tokens per session scan A 39721d503b1e

Subscribe to this mod's changes

xcode is a command published in the GitHub repository marcelrgberger/xcode-cli (2 stars, last pushed 5mo ago), licensed MIT. It adds 42 tokens to every session and 838 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.