A Swift-based command-line tool to quickly scaffold iOS Xcode projects and modules using templates. Built with ArgumentParser and installable globally.
- Generate full SwiftUI-based Xcode projects with a single command
- Add new feature modules using templates (planned)
- Replace placeholders in files (e.g.
__PROJECT_NAME__) - CLI-based, installable globally on any macOS machine
- Static template path (
/usr/local/share/iosgen/Templates) - Supports Tuist, SwiftLint, and SwiftFormat in generated projects
git clone https://github.com/mrardyan/iosgen.git
cd iosgenThis script will:
- Build the CLI with Swift
- Copy the binary to
/usr/local/bin - Copy templates to
/usr/local/share/iosgen/Templates
chmod +x Scripts/install.sh
./Scripts/install.shOnce installed, use the iosgen command globally from any folder.
iosgen init MyAppCreates a new iOS project using the BaseProject-SwiftUI template with Tuist, SwiftLint, and SwiftFormat.
iosgen add-module HomeNote: This feature is planned — contribute if you'd like to help!
Templates should be placed inside:
/usr/local/share/iosgen/Templates/
Example structure:
Templates/
└── BaseProject-SwiftUI/
├── Project.swift
├── App/
│ ├── AppDelegate.swift
│ ├── ContentView.swift
│ └── Info.plist
├── Tests/
│ └── AppTests.swift
├── .swiftlint.yml
└── .swiftformat
Use placeholders like __PROJECT_NAME__ in template files. They will be replaced automatically during generation.
To build locally:
swift build -c releaseTo test without installing:
.build/release/iosgen init MyAppTo distribute via Homebrew:
- Create a new tap repository:
homebrew-iosgen - Add a formula referencing your latest GitHub release
Users can install via:
brew install mrardyan/iosgen/iosgenFeel free to open PRs or issues. Ideas for future:
- Add
add-modulecommand - Support MVVM or Clean Architecture templates
- Interactive mode
MIT License
Need help? Feel free to open an issue!