Skip to content

giginet/Toybox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e650590 Â· Sep 28, 2016

History

55 Commits
Sep 26, 2016
Sep 28, 2016
Sep 28, 2016
Sep 28, 2016
Sep 28, 2016
Sep 26, 2016
Sep 11, 2016
Sep 24, 2016
Sep 24, 2016
Sep 28, 2016
Sep 28, 2016
Sep 28, 2016

Repository files navigation

Toybox

Toybox made easy to manage Xcode Playgrounds.

This product is under development so interfaces might change.

Before Toybox

Using Toybox

Installation

You can install Toybox via Homebrew.

$ brew tap giginet/toybox
$ brew install giginet/toybox/toybox

Xcode 8 is required.

Features

Create new Playground

# Create new Playground for iOS named with timestamp
$ toybox create
# Create 'UIKitDemo.playground' for iOS
$ toybox create UIKitDemo
# 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