swift_package_run
Execute an executable target from a Swift Package using swift run. Specify the package path, executable name, arguments, build configuration, timeout, background execution, and parse-as-library flag.
Instructions
Runs an executable target from a Swift Package with swift run
Input Schema
Name | Required | Description | Default |
---|---|---|---|
arguments | No | Arguments to pass to the executable | |
background | No | Run in background and return immediately (default: false) | |
configuration | No | Build configuration: 'debug' (default) or 'release' | |
executableName | No | Name of executable to run (defaults to package name) | |
packagePath | Yes | Path to the Swift package root (Required) | |
parseAsLibrary | No | Add -parse-as-library flag for @main support (default: false) | |
timeout | No | Timeout in seconds (default: 30, max: 300) |