| name | setup |
| description | Bootstrap the Swift dev environment — verify swift, xcodegen, sourcekit-lsp, swift tools, env vars. |
/setup
Verifies that the host machine has everything needed to work on this Swift project.
Steps
1. Swift toolchain.
swift --version
- If
swift: command not found → halt. Install the Swift toolchain from swift.org or Xcode from the Mac App Store.
- Expect Swift 6.0+.
- Print the version and confirm it's adequate.
2. XcodeGen (required).
xcodegen --version
- If
xcodegen: command not found → halt. Install via brew install xcodegen.
- The harness assumes XcodeGen generates
.xcodeproj from project.yml.
3. sourcekit-lsp (required).
sourcekit-lsp --version 2>/dev/null || echo "sourcekit-lsp: check PATH"
4. Swift format (required — built into Swift 6+).
swift format --version 2>&1 | head -1
- Check that
swift format subcommand is available. It ships with the Swift toolchain for Swift 6+.
5. GitHub CLI (recommended for PR workflow).
gh --version 2>/dev/null || echo "gh: not found — install via 'brew install gh'"
- Used by the
pr skill. If missing, the skill will still partially work (manual PR creation).
6. Environment file.
ls -la .env 2>/dev/null || echo ".env: not found"
- If
.env is missing and the project requires env vars, note which ones.
- Check that required vars (listed in
AGENTS.md) are either set or present in .env.
7. Git configuration.
git config user.name
git config user.email
Outcome
Print a summary table:
Tool Status
──────────────────────────────
swift 6.3.2 ✓
xcodegen 2.42.0 ✓
sourcekit-lsp /usr/bin/ ✓
swift format available ✓
gh 2.67.0 ✓
.env present ✓
git config configured ✓
If any required check fails, halt with a clear installation command.