Use when capturing iOS simulator console output, diagnosing runtime crashes, viewing print/os_log output, or needing structured app logs for analysis. Reference for xclog CLI covering launch, attach, list modes with JSON output.
xclog captures iOS simulator console output by combining simctl launch --console (print/debugPrint/NSLog) with log stream --style json (os_log/Logger). Single binary, no dependencies.
${CLAUDE_PLUGIN_ROOT}/bin/xclog
--timeout--max-linesCheck .axiom/preferences.yaml first. If no saved preferences, run list before launch to discover the correct bundle ID.
App already running? launch will terminate it and relaunch. Use attach if you need to preserve current state (os_log only — no print() capture).
# 1. FIRST: Check .axiom/preferences.yaml for saved device and bundle ID
# 2. If no preferences: Discover installed apps
${CLAUDE_PLUGIN_ROOT}/bin/xclog list
# 3. Find the target app's bundle_id from output
# 4. THEN: Launch with the correct bundle ID (restarts app)
${CLAUDE_PLUGIN_ROOT}/bin/xclog launch com.example.MyApp --timeout 30s --max-lines 200
# OR: Attach to running app without restarting (os_log only)
${CLAUDE_PLUGIN_ROOT}/bin/xclog attach MyApp --timeout 30s --max-lines 200
Axiom saves simulator preferences to .axiom/preferences.yaml in the project root. Check this file before running xclog list — if preferences exist, use the saved device and bundle ID directly.
Before running xclog list, read .axiom/preferences.yaml: