SwiftPlaygroundsCLI
Easily generate Swift Playgrounds from your command line
for the new Playgrounds App on macOS.
Features
- [x] Easily generate and instantly open Swift Playgrounds
- [x] Generate Playground with SwiftUI template
- [x] Open code from GitHub in a Swift Playground
Installation
Mint ?
Mint is a package manager that installs and runs Swift command line tool packages.
Homebrew ?
Homebrew is a free and open-source software package management system that simplifies the installation of software on Apple's macOS operating system.
Usage ??
To generate a new Swift Playground simply run:
If you wish to specify a name for the Playground run:
To generate a Playground with a SwiftUI template run:
A Playground with contents from a GitHub URL can be generated via:
Arguments
A list of the available arguments that are supported by the SwiftPlaygroundsCLI.
Long parameter | Short parameter | Description |
---|---|---|
--view |
-v |
Generate a Playground with a SwiftUI template |
--url |
-u |
Generate a Playground with contents from a URL |
--silent |
-s |
Generate a Playground without opening the Playgrounds application |