Peekie

Peekie is a CLI for Xcode .xcresult bundles. One subcommand per data type — tests, warnings, errors, coverage — each emitting machine-readable JSON (or a human-readable list, or SonarQube XML). Designed to be reached from CI scripts and LLM coding agents (Claude Code, Cursor) without re-explaining how xcresulttool works every time.
Upgrading from 4.x? Read MIGRATION.md.
Table of Contents
Install
The fastest way to get the peekie binary on your PATH is via mise:
mise use github:dodobrands/peekie
Other options: Homebrew tap (coming soon), or download a pre-built binary from the Releases page.
CLI
Five data-axis subcommands. Each runs only the xcrun calls it needs.
peekie tests <xcresult> [--format json|list|sonar|allure] default: list
peekie warnings <xcresult> [--format json|list] default: json
peekie errors <xcresult> [--format json|list] default: json
peekie coverage <xcresult> [--format json|list] default: json
peekie attachments <xcresult> --output-dir <dir> [--format json|list] default: json
peekie tests
Test results, with status filtering, SonarQube and Allure export.
# Human-readable, all statuses
peekie tests Tests.xcresult
# Only failures and flaky tests
peekie tests Tests.xcresult --include failure,mixed
# JSON for a dashboard
peekie tests Tests.xcresult --format json > tests.json
# SonarQube generic test execution XML
peekie tests Tests.xcresult --format sonar --tests-path Tests > sonar-tests.xml
# Allure 2 results directory, ready for `allurectl upload` / `allure generate`
peekie tests Tests.xcresult --format allure --output-dir allure-results
# Same, with XCTest activities mapped to Allure steps and metadata labels
# (allure.id / allure.label.* / allure.name / allure.description) — for UI tests
peekie tests UITests.xcresult --format allure --output-dir allure-results --steps
Options: --include (comma-separated statuses), --include-device-details, --tests-path (required with --format sonar), --output-dir (required with --format allure), --steps (with --format allure: activities → steps and labels; one extra xcresulttool call per test), --attachments skip|export + --attachments-to <dir> (embeds attachment metadata into each test in the JSON output; required together when exporting).
peekie warnings
Flat JSON array of build warnings. Pipe to jq for filtering.
peekie warnings Tests.xcresult
# [
# {"file":"Foo.swift","line":42,"column":8,"type":"DeprecatedDeclaration","message":"'oldFoo()' is deprecated: use bar"},
# ...
# ]
# Group by type
peekie warnings Tests.xcresult | jq 'group_by(.type) | map({type: .[0].type, count: length})'
# Human-readable
peekie warnings Tests.xcresult --format list
# Foo.swift:42:8 [DeprecatedDeclaration] 'oldFoo()' is deprecated
peekie errors
Same shape as warnings, for the errors[] array. Use as a build-failed gate:
errors=$(peekie errors Tests.xcresult | jq 'length')
[ "$errors" -gt 0 ] && exit 1
peekie coverage
# JSON for a dashboard
peekie coverage Tests.xcresult
# {"coverage": 0.6234, "modules": [{"name":"Calculator","coverage":0.71,"files":[…]}, …]}
# Total in one line
peekie coverage Tests.xcresult | jq '.coverage'
# 0.6234
# Padded table
peekie coverage Tests.xcresult --format list
# Calculator 71.6% (167/233)
# StringUtils 84.0% (42/50)
# total 62.3%
peekie attachments