Xcode Playground management made easy
Swift Makefile Ruby Objective-C
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Carthage/Checkouts Add carthage packages as submodules May 15, 2018
Documentation/Images Add image to README Sep 26, 2016
Formula Add bottle May 15, 2018
Sources
Tests/ToyboxKitTests Fix SwiftLint warnings May 15, 2018
Toybox.xcodeproj Support Xcode 9.3 May 15, 2018
.gitignore
.gitmodules Add carthage packages as submodules May 15, 2018
.swift-version
.swiftlint.yml Support SPM (#14) Nov 12, 2017
.travis.yml
Cartfile Support SPM (#14) Nov 12, 2017
Cartfile.resolved Add carthage packages as submodules May 15, 2018
LICENSE.md
Makefile
Package.resolved
Package.swift
README.md Update installation guide May 19, 2018

README.md

Toybox

Build Status GitHub license GitHub release Language

Toybox made easy to manage Xcode Playgrounds.

You can create and open Xcode Playground from CLI.

$ toybox create Snippet
# Generate ~/.toybox/Snippet.playground and open with Xcode

This product is under development so interfaces might change.

Before Toybox

Using Toybox

Installation

Toybox requires High Sierra or above.

Homebrew

$ brew tap giginet/toybox https://github.com/giginet/Toybox.git
$ brew install giginet/toybox/toybox
$ toybox version

If you got error on tapping the formula. try brew untap giginet/toybox before.

Features

Create new Playground

# Create 'UIKitDemo.playground' for iOS
$ toybox create UIKitDemo
# Create a new Playground which is not saved
$ toybox create
# Create 'SpriteKit.playground' for macOS
$ toybox create SpriteKitDemo --platform macos
# Overwrite existing playground 'UIKitDemo'
$ toybox create UIKitDemo -f
# Create but don't open with Xcode
$ toybox create UIKitDemo --no-open
# Create and open with specific Xcode
$ toybox create UIKitDemo --xcode-path /Application/Xcode7.3.app
# Create Playground from standard input
$ echo 'print("Hello World")' | toybox create --input

Created Playgrounds will be saved under $HOME/.toybox

List Playgrounds

# List all existing playgrounds
$ toybox list
# List all playgrounds of specific platform
$ toybox list --platform ios

Open Playground

# Open UIKitDemo.playground with default Xcode
$ toybox open UIKitDemo
# Open UIKitDemo.playground with specific Xcode
$ toybox open UIKitDemo --xcode-path /Application/Xcode7.3.app

Other

# Display current Toybox version
$ toybox version
# Display path to Toybox root directory,
# It should return '$HOME/.toybox'
$ toybox root

Extra Usage

Open existing playgrouds with peco

toybox list | peco | sed -E 's/\(.*\)$//g' | xargs toybox open

Author

giginet <giginet.net@gmail.com>

License

MIT License