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
510
15年メンテしてきたdotfilesから開発トレンドを振り返る 2011 - 2026
giginet
PRO
2
400
Claude Codeログ基盤の構築
giginet
PRO
7
4.4k
Inside of Swift Export
giginet
PRO
1
2.8k
Swiftビルド弾丸ツアー - Swift Buildが作る新しいエコシステム
giginet
PRO
0
2.8k
SwiftでMCPサーバーを作ろう!
giginet
PRO
3
440
Creating Intuitive Developer Tool in Swift
giginet
PRO
0
1.6k
Mergeable Libraryで 高速なアプリ起動を実現しよう!
giginet
PRO
2
8k
5分でわかるExplicitly Built Modules
giginet
PRO
2
1.8k
Other Decks in Programming
See All in Programming
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
6.7k
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
270
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
270
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.7k
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
540
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
200
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
710
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.4k
A2UI という光を覗いてみる
satohjohn
1
140
net-httpのHTTP/2対応について
naruse
0
500
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
250
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
160
Java REST API Framework Comparison - PWX 2021
mraible
34
9.4k
4 Signs Your Business is Dying
shpigford
187
22k
Chasing Engaging Ingredients in Design
codingconduct
0
220
How GitHub (no longer) Works
holman
316
150k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
630
Building Adaptive Systems
keathley
44
3.1k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Embracing the Ebb and Flow
colly
88
5.1k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
240
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
͝ਗ਼ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠