Use xcsift for all Swift and Xcode build commands. Pipe xcodebuild build, xcodebuild test, swift build, swift test through xcsift for structured TOON output with compile errors, warnings, test failures, code coverage, slow tests, and build timing. Essential for parsing Xcode build output, diagnosing compile errors, analyzing test results, and measuring code coverage in any Swift or Xcode project.
xcsift parses and formats xcodebuild/SPM output into token-efficient TOON format optimized for LLM consumption. It extracts compile errors, warnings, test failures, code coverage, and build timing from verbose Xcode output.
Always pipe through xcsift when running:
xcodebuild build / xcodebuild testswift build / swift testAlways redirect stderr and use TOON format:
# Build
xcodebuild build 2>&1 | xcsift -f toon
swift build 2>&1 | xcsift -f toon
# Test
swift test 2>&1 | xcsift -f toon
xcodebuild test 2>&1 | xcsift -f toon
# With warnings
xcodebuild build 2>&1 | xcsift -f toon -w
# With code coverage
swift test --enable-code-coverage 2>&1 | xcsift -f toon -c
xcodebuild test -enableCodeCoverage YES 2>&1 | xcsift -f toon -c
# With detailed per-file coverage
swift test --enable-code-coverage 2>&1 | xcsift -f toon -c --coverage-details
# With executable targets
xcodebuild build 2>&1 | xcsift -f toon -e
# Strict CI mode (fail on warnings or errors)
xcodebuild build 2>&1 | xcsift -f toon -W -E
# Slow test detection
swift test 2>&1 | xcsift -f toon --slow-threshold 1.0
# Build info (per-target phases, timing, dependencies)
xcodebuild build 2>&1 | xcsift -f toon --build-info
| Flag | Description |
|---|---|
-f toon | TOON format (30-60% fewer tokens than JSON) |
-w | Show detailed warnings list |
-W | Treat warnings as errors (Werror) |
-q | Quiet mode (no output on clean success) |
-c | Include code coverage summary |
--coverage-details | Per-file coverage breakdown (use with -c) |
-e | Include executable targets |
-E | Exit with non-zero code on build failure |
--build-info | Per-target phases, timing, and dependencies |
--slow-threshold N | Flag tests slower than N seconds |
--config PATH | Use custom config file (default: .xcsift.toml) |
--init | Generate .xcsift.toml template in current directory |
TOON uses indentation-based structure with tabular arrays: