🧸 Xcode Playground management made easy

Related tags

Miscellaneous Toybox
Overview

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.

Mint

Install yonaskolb/Mint.

$ mint install giginet/toybox

Features

Create new Playground

# Create 'UIKitDemo.playground' for iOS
$ toybox create UIKitDemo
# Create a new Playground which is not saved
$ toybox create
# Create a new auto generated named Playground which is saved like 20190404082446.playground
$ toybox create -s
# 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
$ toybox create UIKitDemo --xcode-version 11.1
# 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
$ toybox open UIKitDemo --xcode-version 11.1

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 | awk '{print $1}' | xargs toybox open

Development

Xcode 11

Open Toybox directory with Xcode 11 directly.

Under Xcode 10.2

$ swift package generate-xcodeproj
$ open Toybox.xcodeproj

Author

giginet <[email protected]>

License

MIT License

You might also like...
FocusSpace - A time-management tool to help you stay focus with your friends
FocusSpace - A time-management tool to help you stay focus with your friends

FocusSpace πŸ† ElleHacks2022 - (Telus) First Place πŸ‘© Developers Manyi Cheng(@man

An Apple Watch remake of the Poketch from Pokemon Diamond and Pearl made with SwiftUI
An Apple Watch remake of the Poketch from Pokemon Diamond and Pearl made with SwiftUI

Apple Watch Poketch What is it? It's an Apple Watch remake of the "Poketch" from Pokemon Diamond and Pearl made with SwiftUI! Check out the YouTube vi

Dice-rolling app made in Swift
Dice-rolling app made in Swift

Dicee Our Goal The objective of this tutorial is to introduce you to the core programming concepts that will form the foundation of most of the apps y

OnBoardSwiftUI-Food - Food App Onboarding screen made with SwiftUI
OnBoardSwiftUI-Food - Food App Onboarding screen made with SwiftUI

OnBoardSwiftUI-Food Food App Onboarding screen made with SwiftUI. App Details Lo

πŸš€ Create, maintain, and interact with Xcode projects at scale
πŸš€ Create, maintain, and interact with Xcode projects at scale

What's Tuist πŸ•Ί Tuist is a command line tool that helps you generate, maintain and interact with Xcode projects. It's open source and written in Swift

A Swift command line tool for generating your Xcode project
A Swift command line tool for generating your Xcode project

XcodeGen XcodeGen is a command line tool written in Swift that generates your Xcode project using your folder structure and a project spec. The projec

 πŸ“ Read, update and write your Xcode projects
πŸ“ Read, update and write your Xcode projects

XcodeProj XcodeProj is a library written in Swift for parsing and working with Xcode projects. It's heavily inspired by CocoaPods XcodeProj and xcode.

SwiftLint Plugin for Xcode.
SwiftLint Plugin for Xcode.

SwiftLint Xcode Plugin Demo Usage Set SwiftLint Path default: Default path is /usr/local/bin/swiftlint relative: Relative path with the current projec

XCode Preview template for UIkit based project.
XCode Preview template for UIkit based project.

SwiftPreview XCode Preview template for UIkit based project. Support custom file template class inherit from UIView and UIViewController. How to use?

Comments
  • install through homebrew error

    install through homebrew error

    The download url seems wrong when I try to install it.

    Error:` Failed to download resource "toybox"
    Download failed: https://github.com/giginet/Toybox/releases/download/0.2.0/toybox-0.3.0.sierra.bottle.tar.gz
    

    I fix it by brew edit and change the root_url to 0.3.0

    opened by Cookiezby 9
  • Add no-save feature

    Add no-save feature

    Closes https://github.com/giginet/Toybox/issues/3

    I implemented autoremove feature.

    • Toybox creates a playground file named <name>.autoremove.playground with --rm option.
    • The files which has .autoremove suffix are not shown by toybox list command.
    • Toybox removes the files with .autoremove suffix every time toybox command has been called.

    Please review it @giginet

    opened by morishin 2
Owner
Kohki Miki
Hi! I'm giginyan. Engineer at @cookpad. I'm interested in Game development. Core Contributor of @fastlane / @Carthage / XcodeGen
Kohki Miki
A Swift playground that comes pre-loaded with Plot, that can be used to explore the new component API.

PlotPlayground A Swift playground that comes pre-loaded with Plot, so that you can quickly try out the library and its new, SwiftUI-like API for build

John Sundell 48 Jan 5, 2023
Swift Interview Problems in Playground

SwiftInterviewProblems Two Parts -- Swift Playgrounds & Read Me Swift Interview Problems in Playground you may have to copy and paste the code into a

Zachary Smith 43 Jan 2, 2023
A Swift Playground to play around Combine

CombinePlayground A Swift Playground to play around Combine Why made this playground To help myself learn Combine, I re-implemented the same features

Jake Lin 5 Apr 17, 2022
Swift Playground version of MetalCity

MetalCity MetalCity is night city scape full procedurally generated, for Swift P

Andy Qua 4 Oct 7, 2022
A sample app demonstrates how to use Atlantis on Swift Playground (iOS/macOS)

Atlantis with Swift Playground A sample app demonstrates how to use Atlantis on

Proxyman 3 Dec 22, 2021
a playground app using `MultipeerConnectivity` to transfor data wirelessly between iOS / iPadOS

README An example app using MultipeerConnectivity to transfor data wirelessly between iOS / iPadOS. Both using Data and Stream to transfer data are su

null 3 Aug 6, 2022
A command line tool for managing Swift Playground projects on your Mac.

swift-playground-tools A command line tool for managing Swift Playground projects on your Mac. Generate Xcode Project $ playground-tools generate-xcod

Liam Nichols 0 Dec 31, 2021
Appwrite playground - a simple way to explore the Appwrite API & Appwrite Apple SDK

Appwrite's Apple Playground ?? Appwrite playground is a simple way to explore the Appwrite API & Appwrite Apple SDK. Use the source code of this repos

Appwrite 24 Nov 22, 2022
LinkedLog is a Xcode plugin that includes a Xcode PCH header file template that adds the macros `LLog` and `LLogF` and parses their output to link from the console to the corresponding file and line.

LinkedLog Xcode Plugin LinkedLog is a Xcode plugin that includes a Xcode PCH file template that adds the macros LLog and LLogF. The LLog macro will wo

Julian F. Weinert 22 Nov 14, 2022
Codable, but with Super power made custom Codable behavior easy.

Codable, but with Super power made custom Codable behavior easy.

Tsungyu Yu 24 Aug 30, 2022