A small streaming CLI filter that consumes raw xcodebuild output and
collapses repetitive build noise.
xcodebuild ... | xcagentifyxcodebuild can emit thousands of nearly identical lines such as
CompileSwift tasks, WriteAuxiliaryFile lines, and their indented
continuation lines. xcagentify folds those so that warnings, errors,
notes and the final build result stay visible.
It also collapses the verbose ios-deploy installation log down to a
single App installed line.
xcodebuild -scheme MyScheme -destination 'platform=iOS Simulator' build | xcagentifyFor CI builds, use pipefail so failures in xcodebuild are not hidden:
set -o pipefail
xcodebuild ... | xcagentifyIf you drive builds with just, pipe every
xcodebuild or swift-test recipe through xcagentify:
set dotenv-load
project := "MyApp.xcodeproj"
scheme := "MyApp"
@test:
cd Core && swift test 2>&1 | xcagentify
@build:
xcodebuild \
-project "{{project}}" \
-scheme "{{scheme}}" \
-destination 'generic/platform=iOS' \
build 2>&1 | xcagentify
@test-app:
#!/usr/bin/env bash
set -euo pipefail
xcodebuild \
-project "{{project}}" \
-scheme "{{scheme}}Tests" \
-destination 'platform=iOS Simulator,name=iPhone 16' \
test 2>&1 | xcagentifyPrefix each recipe line with @ so just does not echo the recipe body,
keeping the output as small as possible.
- Do not pipe
justoutput throughtailwhenxcagentifyis already in use. The filtered output is already short, andtailcan hide warnings, errors, or the final build result. - Use
set -o pipefail(orset -euo pipefailin recipe scripts) so a failure inxcodebuildis not masked by the pipe toxcagentify.
swift buildswift testBuild a release binary and copy it to ~/.local/bin:
swift build -c release
cp .build/release/xcagentify ~/.local/bin/Then use it from anywhere:
xcodebuild ... | xcagentifyThis project also ships a justfile, so the same development and
installation steps can be run with just:
just build
just test
just build-release
just install