Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Useful Command Line Tools in Swift 3
Search
giginet
PRO
October 26, 2016
Programming
8k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Useful Command Line Tools in Swift 3
potatotips #34
giginet
PRO
October 26, 2016
Transcript
22 slides
Useful Command Line Tools in Swift 3 potatotips #34 @giginet
@giginet • iOS Engineer @ Cookpad • ։ൃج൫ͬͯ·͢ • झຯɿήʔϜ։ൃ
None
None
None
None
None
giginet/Toybox
$ toybox create Snippet $ toybox create $ toybox create
—-platform macos $ toybox open Snippet $ toybox list https://github.com/giginet/Toybox
None
CLI with Swift 3
Architecture • Carthage/Commandant toybox ToyboxKit.framework
Carthage/Commandant struct ListOptions: OptionsProtocol { typealias ClientError = ToyboxError let
platform: Platform? static func create(_ platform: Platform?) -> ListOptions { return self.init(platform: platform) } static func evaluate(_ m: CommandMode) -> Result<ListOptions, CommandantError<ToyboxError>> { return create <*> m <| Option<Platform?>(key: "platform", defaultValue: nil, usage: "Platform to list (ios/mac/tvos)") } } struct ListCommand: CommandProtocol { typealias Options = ListOptions typealias ClientError = ToyboxError let verb = "list" let function = "List the Playground" func run(_ options: Options) -> Result<(), ToyboxError> { // Do Something return .success() } }
Distribution
Distribution • HomebrewͰ͢Δ • Makefile • Homebrew Formula • Bottle
Makefile • CarthageͷౕΛύΫΔ $ make prefix_install PREFIX=`brew —-prefix`
class Toybox < Formula desc "Xcode Playground management made easy"
homepage "https://github.com/giginet/Toybox" url "https://github.com/giginet/Toybox.git", :tag => "0.1.0", :revision => "e65059061cd33bdbc01fe9883e6e4d2c863979f4", :shallow => false head "https://github.com/giginet/Toybox.git", :shallow => false depends_on :xcode => ["8.0", :build] depends_on 'carthage' => :build def install system "make", "prefix_install", "PREFIX=#{prefix}" bash_completion.install "Sources/Scripts/toybox-bash- completion" => "toybox" zsh_completion.install "Sources/Scripts/toybox-zsh-completion" => "_toybox" end test do system bin/"toybox" end end
Homebrew Bottle $ brew install giginet/toybox/toybox —- build-bottle $ brew
bottle toybox
None
ײ • Swift 3ॻ͖͍͢ • Commandantศར • ͭΒ͍
brew install giginet/ toybox/toybox
͝ਗ਼ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠
More Decks by giginet
See All by giginet
🀄️ on swiftc
giginet
PRO
0
650
15年メンテしてきたdotfilesから開発トレンドを振り返る 2011 - 2026
giginet
PRO
2
520
Claude Codeログ基盤の構築
giginet
PRO
7
4.8k
Inside of Swift Export
giginet
PRO
1
3.6k
Swiftビルド弾丸ツアー - Swift Buildが作る新しいエコシステム
giginet
PRO
0
3.1k
SwiftでMCPサーバーを作ろう!
giginet
PRO
3
510
Creating Intuitive Developer Tool in Swift
giginet
PRO
0
1.7k
Mergeable Libraryで 高速なアプリ起動を実現しよう!
giginet
PRO
2
8.8k
5分でわかるExplicitly Built Modules
giginet
PRO
2
2k
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
390
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
3
210
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
220
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
220
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
480
SODA - FACT BOOK(JP)
sodainc
1
40k
imagewebp()の向こう側: WebPはなぜ JPEG・PNGより軽いのか
yuzneri
0
140
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
700
Proxmox x Talos Linux x Terraform で実現するなんかいい感じの Kubernetes クラスタ / A Sleek Kubernetes Cluster Powered by Proxmox, Talos Linux, and Terraform
nnaka2992
0
280
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
220
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
400
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
360
Featured
See All Featured
It's Worth the Effort
3n
188
29k
Producing Creativity
orderedlist
PRO
348
41k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
3k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.5k
The Art of Programming - Codeland 2020
erikaheidi
57
15k
Marketing to machines
jonoalderson
1
6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
580
Bash Introduction
62gerente
615
220k
Writing Fast Ruby
sferik
630
63k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
840
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k