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.
Lifecycle
Section titled “Lifecycle”| Command | What it does |
|---|---|
new | Create a new iOS app at ./<AppName>/. |
sync | Resolve SPM dependencies and refresh CLI-managed files. |
doctor | Check the local environment for prerequisites. |
open | Open the project’s .xcodeproj in Xcode. |
version | Print the CLI version. |
Generate
Section titled “Generate”| Command | What it does |
|---|---|
generate feature | Create a feature folder, optionally with screens and a service. |
generate screen | Create a screen (View + ViewModel) and auto-wire its route + navigation. |
generate view | Create a standalone SwiftUI view (no ViewModel). |
generate model | Create a Codable model, optionally inferred from JSON. |
generate service | Create a service trio (protocol + impl + mock) and register it in DI. |
generate route | Add a case to Route.swift. |
generate api | Generate a typed API client from an OpenAPI 3.0+ spec. |
Recipe
Section titled “Recipe”| Command | What it does |
|---|---|
recipe crud | Scaffold a full CRUD pattern: model + 5-method service + 3 screens. |
recipe list | List available recipes. |
Quality
Section titled “Quality”| Command | What it does |
|---|---|
lint | Run SwiftLint with the project’s .swiftlint.yml. |
format | Run SwiftFormat. |
Common flags
Section titled “Common flags”Every generator accepts:
| Flag | Effect |
|---|---|
--dry-run | Print what would change; write nothing. |
--force | Overwrite existing files instead of failing. |
--quiet | Suppress non-error output. |
--verbose | Print detailed operation logs. |
--with-tests | Where applicable, also emit a matching test file. |
Bare-keyword syntax
Section titled “Bare-keyword syntax”Some flags accept a bare-keyword form for readability:
swiftspawn generate screen MovieList on Movies --uses MovieServiceswiftspawn generate view MoviePoster in Moviesswiftspawn generate model Genre in MoviesThese are equivalent to --on Movies and --in Movies.