[ Documentation ]
peach swift

peach swift

Runs a foreground preview for a directory containing Package.swift and Swift sources. The built-in guest mounts the Swift root and preserves view state across source edits. The command needs no author JavaScript entry, Vite configuration, node_modules, or local Swift toolchain. —upload-source explicitly consents to sending this directory and its watched source and resource edits to the existing authenticated Contrast compiler. Stop with Ctrl+C to close the owned preview and host.

terminal
peach swift <SwiftPM-directory> --upload-source

Options

flagdescription
--upload-sourceconsent to uploading the selected package and its watched edits; required with peach login or PEACH_API_KEY
--host-port <port>pin the loopback Swift preview port; otherwise an available port is selected
--headlesslaunch the owned browser preview without a visible window
--device <model>select the simulated device
--driver <playwright|electron>select the existing preview driver
--cdp-port <port>pin the Playwright debugging endpoint

Examples

terminal
peach swift ./MyApp --upload-source