Structure
FlutterCLI
A typed wrapper for flutter CLI commands used by ShipItKit.
struct FlutterCLIOverview
FlutterCLI follows the same RunnableCommandFamily pattern used by GitCLI, XcodeBuildKit, and GradleKit. Every method returns a new value — the family is immutable and value-typed.
Usage
let output = try await FlutterCLI(context: context.shell)
.buildIPA(flavor: nil)
.run()Topics
Initializers
init(context: ShellContext)Creates a
FlutterCLIbound to a shell context.
Instance Properties
let arguments: [String]Arguments for the selected flutter subcommand.
let config: ToolConfigurationShared configuration applied to commands produced by this client.
var context: ShellContextThe shell context used when running this command family.
let stderrDestination: OutputDestinationThe stderr handling strategy for built commands.
let stdoutDestination: OutputDestinationThe stdout handling strategy for built commands.
Instance Methods
func analyze() -> FlutterCLIflutter analyze— runs the Dart analyzer (static analysis).func buildAPK(flavor: String?, dartDefines: [String : String], target: String?) -> FlutterCLIflutter build apk— producesbuild/app/outputs/flutter-apk/app-release.apk.func buildAppBundle(flavor: String?, dartDefines: [String : String], target: String?) -> FlutterCLIflutter build appbundle— producesbuild/app/outputs/bundle/release/app-release.aab.func buildIOS(flavor: String?, dartDefines: [String : String], target: String?) -> FlutterCLIflutter build ios --release— compiles the iOS app without producing an IPA.func buildIPA(flavor: String?, dartDefines: [String : String], target: String?) -> FlutterCLIflutter build ipa— producesbuild/ios/ipa/*.ipadirectly.func command() -> CommandBuilds the raw
fluttercommand.func settingStderrDestination(OutputDestination) -> FlutterCLIfunc settingStdoutDestination(OutputDestination) -> FlutterCLIfunc test(coverage: Bool) -> FlutterCLIflutter test— runs Dart unit tests.func testMachine(coverage: Bool) -> FlutterCLIflutter test --machine— emits newline-delimited JSON events.func updatingConfiguration((ToolConfiguration) -> ToolConfiguration) -> FlutterCLIfunc version() -> FlutterCLIflutter --version— prints Flutter SDK version.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatypeSwiftyShell.OutputRedirectingCommandFamilySwiftyShell.RunnableCommandFamilySwiftyShell.ToolConfigurableCommandFamily