Skip to content

Cheat sheet

Every swiftspawn command in one list, with a one-line summary. Click through for full reference.

A quick map of every command. Click any name for full synopsis, options, examples, and exit codes.

CommandWhat it does
newCreate a new iOS app at ./<AppName>/.
syncResolve SPM dependencies and refresh CLI-managed files.
doctorCheck the local environment for prerequisites.
openOpen the project’s .xcodeproj in Xcode.
versionPrint the CLI version.
CommandWhat it does
generate featureCreate a feature folder, optionally with screens and a service.
generate screenCreate a screen (View + ViewModel) and auto-wire its route + navigation.
generate viewCreate a standalone SwiftUI view (no ViewModel).
generate modelCreate a Codable model, optionally inferred from JSON.
generate serviceCreate a service trio (protocol + impl + mock) and register it in DI.
generate routeAdd a case to Route.swift.
generate apiGenerate a typed API client from an OpenAPI 3.0+ spec.
CommandWhat it does
recipe crudScaffold a full CRUD pattern: model + 5-method service + 3 screens.
recipe listList available recipes.
CommandWhat it does
lintRun SwiftLint with the project’s .swiftlint.yml.
formatRun SwiftFormat.

Every generator accepts:

FlagEffect
--dry-runPrint what would change; write nothing.
--forceOverwrite existing files instead of failing.
--quietSuppress non-error output.
--verbosePrint detailed operation logs.
--with-testsWhere applicable, also emit a matching test file.

Some flags accept a bare-keyword form for readability:

Terminal window
swiftspawn generate screen MovieList on Movies --uses MovieService
swiftspawn generate view MoviePoster in Movies
swiftspawn generate model Genre in Movies

These are equivalent to --on Movies and --in Movies.