### Install xcsift from Source Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/GettingStarted.md Build and install xcsift from its source code. ```bash git clone https://github.com/ldomaradzki/xcsift.git cd xcsift swift build -c release cp .build/release/xcsift /usr/local/bin/ ``` -------------------------------- ### Install xcsift using Homebrew Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/GettingStarted.md Use Homebrew to install the xcsift command-line tool. ```bash brew install xcsift ``` -------------------------------- ### Install xcsift using Mint Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/GettingStarted.md Install xcsift using the Mint package manager. ```bash mint install ldomaradzki/xcsift ``` -------------------------------- ### Install xcsift via Homebrew, mise, Mint, or from source Source: https://context7.com/ldomaradzki/xcsift/llms.txt Choose your preferred method for installing the xcsift command-line tool. Homebrew is recommended for ease of use. ```bash # Homebrew (recommended) brew install xcsift ``` ```bash # mise mise use -g xcsift ``` ```bash # Mint mint install ldomaradzki/xcsift ``` ```bash # From source git clone https://github.com/ldomaradzki/xcsift.git cd xcsift swift build -c release cp .build/release/xcsift /usr/local/bin/ ``` -------------------------------- ### Install xcsift using mise Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/GettingStarted.md Install xcsift globally or locally using the mise package manager. ```bash # Install globally from mise registry mise use -g xcsift # Or explicitly via github backend (downloads binary) mise use -g github:ldomaradzki/xcsift # For project-local installation (adds to .mise.toml) mise use xcsift # Or add to your .mise.toml manually # [tools] # xcsift = "latest" ``` -------------------------------- ### Install xcsift as a Codex Skill Source: https://context7.com/ldomaradzki/xcsift/llms.txt Installs xcsift as a Codex skill, providing usage documentation within Codex. Verify the installation by listing the contents of the skills directory. ```bash xcsift install-codex ``` ```bash xcsift uninstall-codex ``` ```bash ls -la ~/.codex/skills/xcsift/ ``` ```bash # Use in Codex # /xcsift ``` -------------------------------- ### TOML Configuration File Example Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/Configuration.md Example of a `.xcsift.toml` file showing various configuration options for output format, warnings, test analysis, coverage, build info, exit behavior, input format, and TOON-specific settings. ```toml # .xcsift.toml # Output format: "json" (default), "toon", or "github-actions" format = "toon" # Warning options warnings = true # Print detailed warnings list (-w) werror = false # Treat warnings as errors (-W) # Output control quiet = false # Suppress output on success (-q) # Test analysis slow_threshold = 1.0 # Threshold in seconds for slow test detection # Coverage options coverage = false # Enable coverage output (-c) coverage_details = false # Include per-file coverage breakdown coverage_path = "" # Custom path to coverage data (empty = auto-detect) # Build info build_info = false # Include per-target build phases and timing executable = false # Include executable targets (-e) # Exit behavior exit_on_failure = false # Exit with failure code if build does not succeed (-E) # Input format xcbeautify = false # Parse xcbeautify/Tuist-formatted input (--xcbeautify) # TOON format configuration [toon] delimiter = "comma" # "comma", "tab", or "pipe" key_folding = "disabled" # "disabled" or "safe" flatten_depth = 0 # 0 = unlimited, or positive integer ``` -------------------------------- ### Install xcsift Plugins Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/GettingStarted.md Install plugins for automatic integration with coding assistants like Claude Code, Codex, and Cursor. ```bash # Claude Code xcsift install-claude-code # Codex xcsift install-codex # Cursor (project-level) xcsift install-cursor # Cursor (global) xcsift install-cursor --global ``` -------------------------------- ### Install xcsift Hooks for Cursor Source: https://context7.com/ldomaradzki/xcsift/llms.txt Installs xcsift as pre-tool hooks for Cursor, either project-level or globally. Ensure the hook script is executable after installation. ```bash xcsift install-cursor ``` ```bash xcsift install-cursor --global ``` ```bash xcsift uninstall-cursor ``` ```bash cat .cursor/hooks.json ``` ```bash cat ~/.cursor/hooks.json ``` ```bash chmod +x .cursor/hooks/pre-xcsift.sh ``` -------------------------------- ### Install Cursor Hooks (Global) Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/PluginInstallation.md Installs xcsift hooks for Cursor globally for all projects, creating `~/.cursor/hooks.json` and `~/.cursor/hooks/pre-xcsift.sh`. ```bash xcsift install-cursor --global ``` -------------------------------- ### Install Cursor Hooks (Project-Level) Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/PluginInstallation.md Installs xcsift hooks for Cursor at the project level, creating `.cursor/hooks.json` and `.cursor/hooks/pre-xcsift.sh`. ```bash xcsift install-cursor ``` -------------------------------- ### Configuration File Examples Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/Configuration.md Illustrates different ways to configure xcsift using TOML files for project defaults, user preferences, and CI/CD environments. ```toml # Always use TOON format for token efficiency format = "toon" # Always show detailed warnings warnings = true # Set a reasonable slow test threshold slow_threshold = 2.0 ``` ```toml # Personal preference for TOON format format = "toon" # Custom TOON settings [toon] delimiter = "tab" key_folding = "safe" ``` ```toml # .xcsift.toml for CI format = "json" warnings = true werror = true # Fail on warnings exit_on_failure = true # Return non-zero exit code on failure coverage = true coverage_details = true build_info = true ``` -------------------------------- ### Install Codex Skill Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/PluginInstallation.md Installs the xcsift skill for Codex, creating a skill file in the `~/.codex/skills/xcsift/` directory. This provides command documentation and usage examples within Codex. ```bash xcsift install-codex ``` -------------------------------- ### Build Information and TOON Output Example Source: https://github.com/ldomaradzki/xcsift/blob/master/plugins/claude-code/skills/xcsift/SKILL.md Extract detailed build information, including per-target phases and timing, using the `--build-info` flag. The example TOON output demonstrates the structure for status, errors, warnings, and test results. ```bash xcodebuild build 2>&1 | xcsift -f toon --build-info ``` ```toon status: failed summary: errors: 1 warnings: 3 failed_tests: 2 passed_tests: 10 build_time: 12.4s test_time: 5.2s errors[1]{file,line,message}: main.swift,15,"use of undeclared identifier 'foo'" warnings[3]{file,line,message,type}: Parser.swift,20,"unused variable 'result'",compile View.swift,42,"Publishing changes from background threads",swiftui Util.swift,10,"Custom warning message",runtime failed_tests[2]{suite,test,file,line,message,duration}: MyTests,testExample,MyTests.swift,25,"XCTAssertEqual failed",0.123 MyTests,testOther,MyTests.swift,30,"XCTAssertTrue failed",0.456 ``` -------------------------------- ### xcsift TOML Configuration File Example Source: https://github.com/ldomaradzki/xcsift/blob/master/CLAUDE.md Example of a TOML configuration file for xcsift. This file allows setting default options for output format, warnings, coverage, and other features, which can be overridden by CLI flags. ```toml # .xcsift.toml # All options are optional - omit to use defaults # Output format: "json" (default), "toon", or "github-actions" format = "toon" # Warning options warnings = true # Print detailed warnings list (-w) werror = false # Treat warnings as errors (-W) # Output control quiet = false # Suppress output on success (-q) # Test analysis slow_threshold = 1.0 # Threshold in seconds for slow test detection # Coverage options coverage = false # Enable coverage output (-c) coverage_details = false # Include per-file coverage breakdown coverage_path = "" # Custom path to coverage data (empty = auto-detect) # Build info build_info = false # Include per-target build phases and timing executable = false # Include executable targets (-e) # Exit behavior exit_on_failure = false # Exit with failure code if build does not succeed (-E) # Input format xcbeautify = false # Parse xcbeautify/Tuist-formatted input (--xcbeautify) # TOON format configuration [toon] delimiter = "comma" # "comma", "tab", or "pipe" key_folding = "disabled" # "disabled" or "safe" flatten_depth = 0 # 0 = unlimited, or positive integer ``` -------------------------------- ### Install Claude Code Plugin Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/PluginInstallation.md Installs the xcsift plugin for Claude Code. This command adds the xcsift repository to the Claude Code marketplace and then installs the plugin. Requires Claude Code CLI and an internet connection. ```bash xcsift install-claude-code ``` -------------------------------- ### Example Usage with Configuration Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/Configuration.md Demonstrates how xcsift uses configuration files and command-line overrides. Boolean flags like 'warnings' remain enabled if set in the config, even when other options are overridden. ```bash # Uses config: format=toon, warnings=true xcodebuild build 2>&1 | xcsift # CLI overrides format: format=json, warnings=true (from config) xcodebuild build 2>&1 | xcsift -f json # warnings still true (from config) — no --no-warnings flag exists xcodebuild build 2>&1 | xcsift -f json ``` -------------------------------- ### Install Codex Skill Source: https://github.com/ldomaradzki/xcsift/blob/master/CLAUDE.md Installs or uninstalls the xcsift skill for Codex. ```bash xcsift install-codex xcsift uninstall-codex ``` -------------------------------- ### Install Cursor Hooks Source: https://github.com/ldomaradzki/xcsift/blob/master/CLAUDE.md Installs or uninstalls xcsift hooks for Cursor, either project-level or globally. ```bash xcsift install-cursor xcsift install-cursor --global xcsift uninstall-cursor ``` -------------------------------- ### Install xcsift Plugin for Claude Code Source: https://context7.com/ldomaradzki/xcsift/llms.txt Installs the xcsift plugin into Claude Code. After installation, xcodebuild commands are automatically piped through xcsift for formatting. ```bash xcsift install-claude-code ``` ```bash xcsift uninstall-claude-code ``` ```bash claude plugin list ``` ```bash # After installation, xcodebuild commands are automatically piped through xcsift # xcodebuild build 2>&1 → automatically formatted as TOON ``` -------------------------------- ### Full JSON structure example for xcsift Source: https://context7.com/ldomaradzki/xcsift/llms.txt This example shows the comprehensive JSON structure that xcsift can produce, including detailed test failures, coverage, and build information. ```bash # xcodebuild build 2>&1 | xcsift # Full JSON structure example: # { # "status": "failed", # "summary": { # "errors": 1, # "warnings": 3, # "failed_tests": 2, # "linker_errors": 0, # "passed_tests": 10, # "build_time": "3.2s", # "test_time": "5.0s", # "coverage_percent": 85.5, # "slow_tests": 1, # "flaky_tests": 1, # "executables": 2 # }, # "errors": [ # { "file": "main.swift", "line": 15, "message": "use of undeclared identifier 'unknown'" } # ], # "failed_tests": [ # { "test": "MyTests.testLogin", "message": "XCTAssertEqual failed", "file": "MyTests.swift", "line": 42, "duration": 1.234 } # ] # } ``` -------------------------------- ### TOON Output Structure Example Source: https://github.com/ldomaradzki/xcsift/blob/master/plugins/codex/SKILL.md This example illustrates the TOON format, showing how status, summaries, errors, warnings, and test results are structured with indentation and tabular arrays. Note the column definitions in braces. ```toon status: failed summary: errors: 1 warnings: 3 failed_tests: 2 passed_tests: 10 build_time: 12.4s test_time: 5.2s errors[1]{file,line,message}: main.swift,15,"use of undeclared identifier 'foo'" warnings[3]{file,line,message,type}: Parser.swift,20,"unused variable 'result'",compile View.swift,42,"Publishing changes from background threads",swiftui Util.swift,10,"Custom warning message",runtime failed_tests[2]{suite,test,file,line,message,duration}: MyTests,testExample,MyTests.swift,25,"XCTAssertEqual failed",0.123 MyTests,testOther,MyTests.swift,30,"XCTAssertTrue failed",0.456 ``` -------------------------------- ### Install Assistant Plugins Source: https://github.com/ldomaradzki/xcsift/blob/master/README.md Commands to install and uninstall specific plugins for coding assistants like Claude Code, Codex, and Cursor. ```bash xcsift install-claude-code ``` ```bash xcsift uninstall-claude-code ``` ```bash xcsift install-codex ``` ```bash xcsift uninstall-codex ``` ```bash xcsift install-cursor ``` ```bash xcsift uninstall-cursor ``` -------------------------------- ### GitHub Actions Workflow Example Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/OutputFormats.md A sample GitHub Actions workflow step that uses xcsift to process xcodebuild output, automatically generating JSON and annotations on CI. ```yaml - name: Build run: | set -o pipefail xcodebuild build 2>&1 | xcsift # Outputs JSON + annotations automatically on CI ``` -------------------------------- ### TOON Format Example Source: https://github.com/ldomaradzki/xcsift/blob/master/CLAUDE.md Example output in TOON format, a compact serialization format optimized for LLM consumption. It offers significant token reduction compared to JSON. ```toon status: failed summary: errors: 1 warnings: 3 failed_tests: 0 passed_tests: null build_time: null test_time: null coverage_percent: null errors[1]{file,line,message}: main.swift,15,"use of undeclared identifier \"unknown\"" warnings[3]{file,line,message}: Parser.swift,20,"immutable value \"result\" was never used" Parser.swift,25,"variable \"foo\" was never mutated" Model.swift,30,"initialization of immutable value \"bar\" was never used" ``` -------------------------------- ### Example TOON Output Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/OutputFormats.md Demonstrates the TOON format, which offers token reduction compared to JSON, ideal for LLM consumption. Features tabular arrays and indentation-based structure. ```toon status: failed summary: errors: 1 warnings: 3 failed_tests: 0 linker_errors: 0 errors[1]{file,line,message}: main.swift,15,"use of undeclared identifier \"unknown\"" warnings[3]{file,line,message,type}: Parser.swift,20,"immutable value \"result\" was never used","compile" Parser.swift,25,"variable \"foo\" was never mutated","compile" Model.swift,30,"initialization of immutable value \"bar\" was never used","compile" ``` -------------------------------- ### Verify Cursor Hooks Installation Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/PluginInstallation.md Checks the Cursor hooks configuration files for project-level or global installations and tests xcsift integration with a build command. ```bash # Check hooks (project-level) cat .cursor/hooks.json ``` ```bash # Check hooks (global) cat ~/.cursor/hooks.json ``` ```bash # Test with a build xcodebuild build 2>&1 # Should show xcsift-formatted output ``` -------------------------------- ### GitHub Actions CI Output Example Source: https://github.com/ldomaradzki/xcsift/blob/master/CLAUDE.md Example of combined JSON output and GitHub Actions annotations for CI environments. This format provides both structured data and inline annotations for PRs and the Actions UI. ```text { "status": "failed", "summary": { "errors": 1, "warnings": 2 } } ::error file=main.swift,line=15,col=5::use of undeclared identifier 'unknown' ::warning file=Parser.swift,line=20,col=10::immutable value 'result' was never used ::notice ::Build failed, 1 error, 2 warnings ``` -------------------------------- ### Verify Codex Skill Installation Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/PluginInstallation.md Verifies the Codex skill installation by checking the skills directory and demonstrating how to use the skill within Codex. ```bash # Check skills directory ls -la ~/.codex/skills/xcsift/ ``` ```bash # Use the skill in Codex # Type: /xcsift ``` -------------------------------- ### GitHub Actions Integration Usage in CI Source: https://github.com/ldomaradzki/xcsift/blob/master/CLAUDE.md Examples of how to integrate xcsift with GitHub Actions workflows. These commands demonstrate different output formats including TOON and annotations-only. ```yaml # GitHub Actions workflow - name: Build run: xcodebuild build 2>&1 | xcsift # JSON + annotations automatic - name: Build with TOON run: xcodebuild build 2>&1 | xcsift -f toon # TOON + annotations automatic - name: Annotations only (no JSON/TOON) run: xcodebuild build 2>&1 | xcsift -f github-actions ``` -------------------------------- ### Install Claude Code Plugin Source: https://github.com/ldomaradzki/xcsift/blob/master/CLAUDE.md Installs or uninstalls the xcsift plugin for Claude Code. This enables automatic output parsing for coding assistants. ```bash xcsift install-claude-code xcsift uninstall-claude-code ``` -------------------------------- ### Check xcsift Version Source: https://context7.com/ldomaradzki/xcsift/llms.txt Displays the installed version of the xcsift tool. ```bash # Version check xcsift --version ``` -------------------------------- ### Code Signing for Watch Simulator Builds Source: https://github.com/ldomaradzki/xcsift/blob/master/Tests/Fixtures/build.txt This snippet demonstrates code signing a bundle for a `watchsimulator` target. It uses the same local signing identity as the iPhone simulator example. ```shell CodeSign /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Products/Debug-watchsimulator/PostHog_PostHog.bundle (in target 'PostHog_PostHog' from project 'PostHog') cd /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/SourcePackages/checkouts/posthog-ios Signing Identity: "Sign to Run Locally" /usr/bin/codesign --force --sign - --timestamp\=none --generate-entitlement-der /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Products/Debug-watchsimulator/PostHog_PostHog.bundle ``` -------------------------------- ### Summary-Only TOON Format Output Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/CodeCoverage.md This is an example of summary-only output when using the TOON format with xcsift. ```toon status: succeeded summary: errors: 0 warnings: 0 failed_tests: 0 passed_tests: 42 coverage_percent: 85.5 ``` -------------------------------- ### Enable Details Mode for Coverage Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/CodeCoverage.md Use the `--coverage-details` flag with xcsift to get a per-file breakdown of code coverage. ```bash swift test --enable-code-coverage 2>&1 | xcsift --coverage --coverage-details ``` -------------------------------- ### GitHub Actions Annotation Examples Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/OutputFormats.md Illustrates the format for GitHub Actions annotations, used to report errors, warnings, and notices directly in the workflow UI. ```text ::error file=main.swift,line=15,col=5::use of undeclared identifier 'unknown' ::warning file=Parser.swift,line=20,col=10::immutable value 'result' was never used ::notice ::Build failed, 1 error, 2 warnings ``` -------------------------------- ### Code Signing for Debug Builds Source: https://github.com/ldomaradzki/xcsift/blob/master/Tests/Fixtures/build.txt The `CodeSign` command is used to sign executable files. This example shows signing a bundle for an `iphonesimulator` target using a local development signing identity. ```shell CodeSign /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Products/Debug-iphonesimulator/PostHog_PostHog.bundle (in target 'PostHog_PostHog' from project 'PostHog') cd /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/SourcePackages/checkouts/posthog-ios Signing Identity: "Sign to Run Locally" /usr/bin/codesign --force --sign - --timestamp\=none --generate-entitlement-der /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Products/Debug-iphonesimulator/PostHog_PostHog.bundle ``` -------------------------------- ### Scanning Dependencies for Object Files Source: https://github.com/ldomaradzki/xcsift/blob/master/Tests/Fixtures/build.txt The `ScanDependencies` command is used to process source files and generate object files. This example shows scanning a C source file for a watch simulator build, utilizing a response file for compiler arguments. ```shell ScanDependencies /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Intermediates.noindex/PostHog.build/Debug-watchsimulator/phlibwebp.build/Objects-normal/x86_64/yuv_sse41.o /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/SourcePackages/checkouts/posthog-ios/vendor/libwebp/yuv_sse41.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler (in target 'phlibwebp' from project 'PostHog') cd /Users/joec/git/basic-meditation/SimpleMeditation/SimpleMeditation.xcodeproj Using response file: /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Intermediates.noindex/PostHog.build/Debug-watchsimulator/phlibwebp.build/Objects-normal/x86_64/7187679823f38a2a940e0043cdf9d637-common-args.resp ``` -------------------------------- ### Initialize and Use Configuration Files Source: https://context7.com/ldomaradzki/xcsift/llms.txt Generate a template configuration file using `xcsift --init`. Use `xcsift --config ` to specify a configuration file. CLI flags override config file values. ```bash # Generate .xcsift.toml template in current directory xcsift --init ``` ```bash # Use a specific config file xcodebuild build 2>&1 | xcsift --config ~/my-project-config.toml ``` ```toml # TOML configuration file example # [build_info] # enabled = true # # [executables] # enabled = true # # [linker_errors] # enabled = true # # [toon] # delimiter = "pipe" # key_folding = "safe" # flatten_depth = 3 # warnings = true # color = true ``` -------------------------------- ### All TOON Options with xcsift Source: https://context7.com/ldomaradzki/xcsift/llms.txt Demonstrates using all TOON formatting options, including pipe delimiter, safe key folding, and depth-limited flattening, along with warnings and coverage. ```bash # All TOON options: pipe delimiter, safe key folding, depth-limited xcodebuild test 2>&1 | xcsift -f toon --toon-delimiter pipe \ --toon-key-folding safe --toon-flatten-depth 5 -w -c ``` -------------------------------- ### Build Project with Swift Source: https://github.com/ldomaradzki/xcsift/blob/master/CLAUDE.md Standard commands to build the Swift project. Use the release configuration for optimized builds. ```bash swift build swift build -c release ``` -------------------------------- ### Build, Test, and Format Project Source: https://github.com/ldomaradzki/xcsift/blob/master/README.md Standard commands for building the project, running tests, and formatting the code. Ensure code is formatted before committing. ```bash swift build # Build swift test # Run tests swift format --recursive --in-place . # Format (required before committing) ``` -------------------------------- ### Show Build Info Source: https://github.com/ldomaradzki/xcsift/blob/master/CLAUDE.md Display per-target phases and timing information for builds. Use the '--build-info' flag. ```bash xcodebuild build 2>&1 | xcsift --build-info ``` ```bash swift build 2>&1 | xcsift --build-info ``` ```bash xcodebuild build 2>&1 | xcsift -f toon --build-info -w ``` -------------------------------- ### Verify Claude Code Plugin Installation Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/PluginInstallation.md Checks the status of installed Claude Code plugins and tests xcsift integration with a build command. ```bash # Check plugin status claude plugin list ``` ```bash # Test with a build xcodebuild build 2>&1 # Should show xcsift-formatted output ``` -------------------------------- ### Preview Project Documentation Locally Source: https://github.com/ldomaradzki/xcsift/blob/master/README.md Command to preview the project's documentation locally. This command requires the Swift Package Manager and may disable sandboxing for the preview. ```bash swift package --disable-sandbox preview-documentation --target xcsift ``` -------------------------------- ### xcsift Initialization and Configuration Source: https://github.com/ldomaradzki/xcsift/blob/master/plugins/claude-code/skills/xcsift/SKILL.md Generate a default configuration file (`.xcsift.toml`) for xcsift using the `--init` flag. This file can then be customized for specific project needs. ```bash xcsift --init ``` -------------------------------- ### Full Build Analysis with TOON and Build Info Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/Usage.md Conduct a comprehensive build analysis using TOON format, including executable target information and detailed build metrics. ```bash xcodebuild build 2>&1 | xcsift -f toon -e -w --build-info ``` -------------------------------- ### All TOON Options Combined Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/Usage.md Demonstrates using multiple TOON-specific flags along with coverage and warning flags for comprehensive analysis. ```bash xcodebuild test 2>&1 | xcsift -f toon --toon-delimiter pipe --toon-key-folding safe -w -c ``` -------------------------------- ### Include Build Info with xcsift Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/Usage.md Includes per-target build phases, timing, and dependencies in the output. This provides detailed insights into the build process, including slowest targets and their phases. ```bash # Basic build info xcodebuild build 2>&1 | xcsift --build-info swift build 2>&1 | xcsift --build-info # Combine with other flags xcodebuild build 2>&1 | xcsift -f toon --build-info -w ``` -------------------------------- ### Run Project Tests with Swift Source: https://github.com/ldomaradzki/xcsift/blob/master/CLAUDE.md Command to execute the project's tests using Swift Package Manager. ```bash swift test ``` -------------------------------- ### TOON Format with Coverage Details Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/Usage.md Process build output in TOON format and include detailed coverage information by using `-f toon -c --coverage-details`. ```bash swift test --enable-code-coverage 2>&1 | xcsift -f toon -c --coverage-details ``` -------------------------------- ### Build with Executable Targets in TOON Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/Usage.md Analyze build output for executable targets in TOON format, including warnings. ```bash xcodebuild build 2>&1 | xcsift -e -w -f toon ``` -------------------------------- ### Full Build Analysis with xcsift Source: https://context7.com/ldomaradzki/xcsift/llms.txt Performs a full build analysis using TOON format, warnings, executables, and build info flags. ```bash # Full build analysis: TOON + warnings + executables + build info xcodebuild build 2>&1 | xcsift -f toon -e -w --build-info ``` -------------------------------- ### Configuration Error Messages Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/Configuration.md Examples of user-friendly error messages provided by xcsift for common configuration issues. ```text Error: Configuration file not found: /path/to/config.toml Error: TOML syntax error at line 5, column 12: unterminated string Error: Invalid value 'yaml' for 'format'. Valid options: json, toon, github-actions Error: Type mismatch at 'warnings': expected Bool, found String ``` -------------------------------- ### Basic Build and Test Commands with xcsift Source: https://github.com/ldomaradzki/xcsift/blob/master/plugins/claude-code/skills/xcsift/SKILL.md Pipe standard build and test commands through xcsift with the TOON format flag. Ensure stderr is redirected using `2>&1` to capture all output. ```bash xcodebuild build 2>&1 | xcsift -f toon swift build 2>&1 | xcsift -f toon swift test 2>&1 | xcsift -f toon xcodebuild test 2>&1 | xcsift -f toon ``` -------------------------------- ### Uninstall Cursor Hooks Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/PluginInstallation.md Removes Cursor hooks, automatically detecting and cleaning up either project-level or global installations. ```bash xcsift uninstall-cursor ``` -------------------------------- ### Advanced xcsift Options for Detailed Output Source: https://github.com/ldomaradzki/xcsift/blob/master/plugins/codex/SKILL.md Obtain per-file coverage details with '--coverage-details', include executable targets with '-e', or enable strict CI mode by treating warnings as errors with '-W' and failing on build errors with '-E'. ```bash swift test --enable-code-coverage 2>&1 | xcsift -f toon -c --coverage-details ``` ```bash xcodebuild build 2>&1 | xcsift -f toon -e ``` ```bash xcodebuild build 2>&1 | xcsift -f toon -W -E ``` -------------------------------- ### Troubleshoot Codex: Create Skills Directory Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/PluginInstallation.md Manually creates the `~/.codex/skills/` directory if it does not exist or is not writable. ```bash mkdir -p ~/.codex/skills/ ``` -------------------------------- ### xcsift TOON Format Source: https://github.com/ldomaradzki/xcsift/blob/master/CLAUDE.md Outputs build results in Token-Oriented Object Notation (TOON) format, which uses 30-60% fewer tokens for optimized LLM consumption. ```bash # TOON format (30-60% fewer tokens for LLMs) # Token-Oriented Object Notation - optimized for LLM consumption ``` -------------------------------- ### Override Configuration with CLI Flags Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/Usage.md Command-line flags always take precedence over settings in the configuration file. This example shows overriding a TOON format setting to JSON via the CLI. ```bash # Config has format = "toon", but CLI overrides to JSON xcodebuild build 2>&1 | xcsift -f json ``` -------------------------------- ### Parse Per-Target Build Phases and Timing with --build-info Source: https://context7.com/ldomaradzki/xcsift/llms.txt Use the --build-info flag to include per-target build phases, timing, and dependency graph in the output. It also reports the top 5 slowest targets. ```bash xcodebuild build 2>&1 | xcsift --build-info ``` ```json # { # "summary": { "build_time": "35.5s" }, # "build_info": { # "targets": [ # { # "name": "MyFramework", # "duration": "12.4s", # "phases": ["CompileSwiftSources", "Link"] # }, # { # "name": "MyApp", # "duration": "23.1s", # "phases": ["CompileSwiftSources", "Link", "CopySwiftLibs"], # "depends_on": ["MyFramework"] # } # ], # "slowest_targets": ["MyApp", "MyFramework"] # } # } ``` ```bash # TOON with build info and warnings xcodebuild build 2>&1 | xcsift -f toon --build-info -w ``` -------------------------------- ### Build Info in TOON Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/OutputFormats.md Shows build information in a compact TOON format, suitable for machine parsing and LLM consumption. Includes target details and dependencies. ```toon status: success summary: errors: 0 warnings: 0 build_time: "15.3s" build_info: targets[2]{name,duration,phases,depends_on}: "MyFramework","12.4s",["CompileSwiftSources","Link"],[] "MyApp","23.1s",["CompileSwiftSources","Link","CopySwiftLibs"],["MyFramework"] ``` -------------------------------- ### Basic Syntax for xcsift Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/Usage.md Shows the basic syntax for piping build output to xcsift. Always redirect stderr to stdout with `2>&1` to capture all compiler output. ```bash xcodebuild [flags] 2>&1 | xcsift [options] swift build 2>&1 | xcsift [options] swift test 2>&1 | xcsift [options] ``` -------------------------------- ### Use Custom Configuration File Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/Configuration.md Specify a custom configuration file path using the `--config` flag. xcsift will exit with an error if the specified file does not exist. ```bash xcodebuild build 2>&1 | xcsift --config ~/my-project-config.toml ``` -------------------------------- ### Create Universal Binary with lipo Source: https://github.com/ldomaradzki/xcsift/blob/master/Tests/Fixtures/build.txt This command uses 'lipo' to create a universal binary for the 'PostHog' target, combining object files compiled for different architectures (arm64 and x86_64) for watchOS simulator. ```bash CreateUniversalBinary /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Products/Debug-watchsimulator/PostHog.o normal arm64\ x86_64 (in target 'PostHog' from project 'PostHog') cd /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/SourcePackages/checkouts/posthog-ios /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -create /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Intermediates.noindex/PostHog.build/Debug-watchsimulator/PostHog.build/Objects-normal/arm64/Binary/PostHog.o /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Intermediates.noindex/PostHog.build/Debug-watchsimulator/PostHog.build/Objects-normal/x86_64/Binary/PostHog.o -output /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Products/Debug-watchsimulator/PostHog.o ``` -------------------------------- ### Select Output Format with xcsift Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/Usage.md Selects the output format for xcsift. Options include `json` (default), `toon`, or `github-actions`. The `toon` format produces fewer tokens. ```bash # JSON (default) xcodebuild build 2>&1 | xcsift # TOON (30-60% fewer tokens) xcodebuild build 2>&1 | xcsift --format toon xcodebuild build 2>&1 | xcsift -f toon # GitHub Actions annotations only xcodebuild build 2>&1 | xcsift -f github-actions ``` -------------------------------- ### Basic Build with xcsift Source: https://github.com/ldomaradzki/xcsift/blob/master/README.md Pipe the output of xcodebuild or swift build commands through xcsift for processing. Ensure to capture stderr using `2>&1`. ```bash xcodebuild build 2>&1 | xcsift swift build 2>&1 | xcsift ``` -------------------------------- ### Generate xcsift Configuration File Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/GettingStarted.md Generate a template configuration file (.xcsift.toml) in the current directory to set default options. ```bash # Generate template in current directory xcsift --init ``` -------------------------------- ### Create Universal Binary with Lipo Source: https://github.com/ldomaradzki/xcsift/blob/master/Tests/Fixtures/build.txt This command uses lipo to create a universal binary for a watchOS application by combining pre-compiled binaries for different architectures (arm64 and x86_64). ```bash CreateUniversalBinary /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Products/Debug-watchsimulator/Minimalist\ Meditation\ Watch\ App.app/Minimalist\ Meditation\ Watch\ App normal arm64\ x86_64 (in target 'Minimalist Meditation Watch App' from project 'SimpleMeditation') cd /Users/joec/git/basic-meditation/SimpleMeditation /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -create /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Intermediates.noindex/SimpleMeditation.build/Debug-watchsimulator/Minimalist\ Meditation\ Watch\ App.build/Objects-normal/arm64/Binary/Minimalist\ Meditation\ Watch\ App /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Intermediates.noindex/SimpleMeditation.build/Debug-watchsimulator/Minimalist\ Meditation\ Watch\ App.build/Objects-normal/x86_64/Binary/Minimalist\ Meditation\ Watch\ App -output /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Products/Debug-watchsimulator/Minimalist\ Meditation\ Watch\ App.app/Minimalist\ Meditation\ Watch\ App ``` -------------------------------- ### Specify Configuration File Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/Usage.md Use the `--config` flag to explicitly point to a configuration file. If the file does not exist, xcsift will report an error. ```bash xcodebuild build 2>&1 | xcsift --config ~/my-config.toml ``` -------------------------------- ### JSON Build Info: Target Phases and Timing Source: https://github.com/ldomaradzki/xcsift/blob/master/CLAUDE.md The `--build-info` flag provides detailed build information per target, including phases executed and their durations. This is valuable for performance analysis and identifying build bottlenecks. ```json { "build_info": { "targets": [ { "name": "MyFramework", "duration": "12.4s", "phases": ["CompileSwiftSources", "Link"] }, { "name": "MyApp", "duration": "23.1s", "phases": ["CompileSwiftSources", "Link", "CopySwiftLibs"], "depends_on": ["MyFramework"] } ], "slowest_targets": ["MyApp", "MyFramework"] } } ``` -------------------------------- ### CI Pipeline Configuration Source: https://github.com/ldomaradzki/xcsift/blob/master/README.md Configure xcsift to treat warnings as errors and exit immediately if a failure occurs, suitable for CI environments. ```bash xcodebuild build 2>&1 | xcsift --Werror --exit-on-failure ``` -------------------------------- ### Troubleshoot Hooks: Ensure Execute Permissions Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/PluginInstallation.md Sets execute permissions on the `pre-xcsift.sh` hook script. ```bash chmod +x .cursor/hooks/pre-xcsift.sh ``` -------------------------------- ### TOON Output with Warnings Source: https://github.com/ldomaradzki/xcsift/blob/master/CLAUDE.md Include warnings in the TOON output. Use '--warnings' or '-w' flag. ```bash swift build 2>&1 | xcsift -f toon --warnings ``` ```bash xcodebuild build 2>&1 | xcsift -f toon -w ``` -------------------------------- ### CI Integration: Strict Swift Tests Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/Usage.md Configure xcsift for CI with Swift tests, using flags to treat warnings as errors and exit on failure, formatted in TOON. ```bash swift test 2>&1 | xcsift -W -E -f toon ``` -------------------------------- ### Build Info in JSON Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/OutputFormats.md Displays build information including targets, durations, and phases. Parses target dependencies from xcodebuild output. Empty fields are omitted. ```json { "build_info": { "targets": [ { "name": "MyFramework", "duration": "12.4s", "phases": ["CompileSwiftSources", "Link"] }, { "name": "MyApp", "duration": "23.1s", "phases": ["CompileSwiftSources", "Link", "CopySwiftLibs"], "depends_on": ["MyFramework"] } ] } } ``` -------------------------------- ### Compile Thinned Asset Catalog for Device Source: https://github.com/ldomaradzki/xcsift/blob/master/Tests/Fixtures/build.txt This command compiles a 'thinned' asset catalog, optimizing it for specific device configurations and OS versions. It's useful for reducing app size by including only necessary assets. ```bash /Applications/Xcode.app/Contents/Developer/usr/bin/actool /Users/joec/git/basic-meditation/SimpleMeditation/Shared/Resources/SimpleMeditation.icon /Users/joec/git/basic-meditation/SimpleMeditation/Shared/Assets.xcassets --compile /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Intermediates.noindex/SimpleMeditation.build/Debug-iphonesimulator/SimpleMeditation.build/assetcatalog_output/thinned --output-format human-readable-text --notices --warnings --export-dependency-info /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Intermediates.noindex/SimpleMeditation.build/Debug-iphonesimulator/SimpleMeditation.build/assetcatalog_dependencies_thinned --output-partial-info-plist /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Intermediates.noindex/SimpleMeditation.build/Debug-iphonesimulator/SimpleMeditation.build/assetcatalog_generated_info.plist_thinned --app-icon SimpleMeditation --accent-color AccentColor --compress-pngs --enable-on-demand-resources YES --filter-for-thinning-device-configuration iPhone18,2 --filter-for-device-os-version 26.0 --development-region en --target-device iphone --target-device ipad --minimum-deployment-target 18.6 --platform iphonesimulator ``` -------------------------------- ### Process Basic Build Output Source: https://github.com/ldomaradzki/xcsift/blob/master/Sources/xcsift.docc/GettingStarted.md Pipe the output of xcodebuild or swift build to xcsift for parsing. Ensure to redirect stderr to stdout using 2>&1. ```bash # Important: Always use 2>&1 to capture stderr xcodebuild build 2>&1 | xcsift # Swift Package Manager swift build 2>&1 | xcsift ``` -------------------------------- ### Basic TOON Output with xcodebuild Source: https://github.com/ldomaradzki/xcsift/blob/master/CLAUDE.md Generate basic TOON output from xcodebuild build logs. Use '-f toon' or '--format toon' for the TOON format. ```bash xcodebuild build 2>&1 | xcsift --format toon ``` ```bash xcodebuild build 2>&1 | xcsift -f toon ``` -------------------------------- ### Compile Asset Catalog for Simulator Source: https://github.com/ldomaradzki/xcsift/blob/master/Tests/Fixtures/build.txt Use this command to compile asset catalogs for a specific target, such as an iPhone simulator. It generates necessary asset symbol files and plist outputs. ```bash /Applications/Xcode.app/Contents/Developer/usr/bin/actool /Users/joec/git/basic-meditation/SimpleMeditation/Shared/Resources/SimpleMeditation.icon /Users/joec/git/basic-meditation/SimpleMeditation/Shared/Assets.xcassets --compile /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Products/Debug-iphonesimulator/SimpleMeditation.app --output-format human-readable-text --notices --warnings --export-dependency-info /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Intermediates.noindex/SimpleMeditation.build/Debug-iphonesimulator/SimpleMeditation.build/assetcatalog_dependencies --output-partial-info-plist /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Intermediates.noindex/SimpleMeditation.build/Debug-iphonesimulator/SimpleMeditation.build/assetcatalog_generated_info.plist --app-icon SimpleMeditation --accent-color AccentColor --compress-pngs --enable-on-demand-resources YES --development-region en --target-device iphone --target-device ipad --minimum-deployment-target 18.6 --platform iphonesimulator --bundle-identifier com.appjawn.SimpleMeditation --generate-swift-asset-symbols /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Intermediates.noindex/SimpleMeditation.build/Debug-iphonesimulator/SimpleMeditation.build/DerivedSources/GeneratedAssetSymbols.swift --generate-objc-asset-symbols /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Intermediates.noindex/SimpleMeditation.build/Debug-iphonesimulator/SimpleMeditation.build/DerivedSources/GeneratedAssetSymbols.h --generate-asset-symbol-index /Users/joec/Library/Developer/Xcode/DerivedData/SimpleMeditation-hcmlfsesyefyqqeejbqmzcwhlkkz/Build/Intermediates.noindex/SimpleMeditation.build/Debug-iphonesimulator/SimpleMeditation.build/DerivedSources/GeneratedAssetSymbols-Index.plist ```