Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SvenTiigi/SwiftPlaygroundsCLI
Easily generate Swift Playgrounds from your command line 👨💻
https://github.com/SvenTiigi/SwiftPlaygroundsCLI
brew cli playgroundbook playgrounds script swift swiftplaygrounds xcode
Last synced: about 2 months ago
JSON representation
Easily generate Swift Playgrounds from your command line 👨💻
- Host: GitHub
- URL: https://github.com/SvenTiigi/SwiftPlaygroundsCLI
- Owner: SvenTiigi
- License: mit
- Archived: true
- Created: 2020-02-12T09:01:34.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-17T07:57:30.000Z (over 4 years ago)
- Last Synced: 2024-05-02T03:43:05.952Z (9 months ago)
- Topics: brew, cli, playgroundbook, playgrounds, script, swift, swiftplaygrounds, xcode
- Language: Swift
- Homepage: https://sventiigi.github.io/SwiftPlaygroundsCLI/
- Size: 984 KB
- Stars: 112
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
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
> Before installing the SwiftPlaygroundsCLI please make sure you have downloaded the [`Playgrounds.app`](https://apps.apple.com/app/swift-playgrounds/id908519492) from the Mac App Store.
### Mint 🌱
[Mint](https://github.com/yonaskolb/Mint) is a package manager that installs and runs Swift command line tool packages.
```bash
$ mint install SvenTiigi/SwiftPlaygroundsCLI
```### Homebrew 🍺
[Homebrew](https://brew.sh/) is a free and open-source software package management system that simplifies the installation of software on Apple's macOS operating system.
```bash
$ brew tap SvenTiigi/SwiftPlaygroundsCLI
$ brew install swiftplaygroundscli
```## Usage 👨💻
To generate a new Swift Playground simply run:
```bash
$ swiftplayground new
```If you wish to specify a name for the Playground run:
```bash
$ swiftplayground new MyAwesomePlayground
```Generate a Playground from your clipboard content via:
```bash
$ swiftplayground new --clipboard
```To generate a Playground with a SwiftUI template run:
```bash
$ swiftplayground new --view
```
A Playground with contents from a GitHub URL can be generated via:
```bash
$ swiftplayground new --url https://gist.github.com/SvenTiigi/7eae5e55edd9be41211470fcbd937285
```
## Arguments
A list of the available arguments that are supported by the SwiftPlaygroundsCLI.
### new command
| Long parameter | Short parameter | Description
| ----------- | ----------- | -------------- |
| `--clipboard` | `-c` | Generate a Playground from the current Clipboard content |
| `--silent` | `-s` | Generate a Playground without opening the Playgrounds application |
| `--url` | `-u` | Generate a Playground with contents from a URL |
| `--view` | `-v` | Generate a Playground with a SwiftUI template |## Featured on
* [iOS Dev Weekly](https://iosdevweekly.com/issues/443)
* [Swift Weekly](http://digest.swiftweekly.com/issues/swift-weekly-issue-181-226438)
* [iOS Goodies](https://ios-goodies.com/post/190933912346/week-322)## Contributing
Contributions are very welcome 🙌 🤓## Credits
SwiftPlaygroundsCLI is inspired by [`Playground`](https://github.com/JohnSundell/Playground) from [JohnSundell](https://twitter.com/johnsundell)## License
```
SwiftPlaygroundsCLI
Copyright (c) 2020 Sven TiigiPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```