Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Useful Command Line Tools in Swift 3
Search
giginet
PRO
October 26, 2016
Programming
7.9k
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
More Decks by giginet
See All by giginet
🀄️ on swiftc
giginet
PRO
0
530
15年メンテしてきたdotfilesから開発トレンドを振り返る 2011 - 2026
giginet
PRO
2
410
Claude Codeログ基盤の構築
giginet
PRO
7
4.5k
Inside of Swift Export
giginet
PRO
1
3k
Swiftビルド弾丸ツアー - Swift Buildが作る新しいエコシステム
giginet
PRO
0
2.8k
SwiftでMCPサーバーを作ろう!
giginet
PRO
3
450
Creating Intuitive Developer Tool in Swift
giginet
PRO
0
1.6k
Mergeable Libraryで 高速なアプリ起動を実現しよう!
giginet
PRO
2
8.2k
5分でわかるExplicitly Built Modules
giginet
PRO
2
1.9k
Other Decks in Programming
See All in Programming
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
150
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
260
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.1k
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
880
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
230
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
270
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
310
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
460
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
170
関数型プログラミングのメリットって何だろう?
wanko_it
0
180
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.9k
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
360
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
Claude Code のすすめ
schroneko
67
230k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
How to train your dragon (web standard)
notwaldorf
97
6.7k
We Have a Design System, Now What?
morganepeng
55
8.2k
Docker and Python
trallard
47
4k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.7k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
190
Transcript
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
͝ਗ਼ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠