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
CLI apps. For fun and profit
Search
Marin Usalj
May 29, 2014
Programming
4
16k
CLI apps. For fun and profit
Talk given at Cocoa Kucha on #inspect conference, May 2014
Marin Usalj
May 29, 2014
Tweet
Share
More Decks by Marin Usalj
See All by Marin Usalj
Code signing on iOS/OSX
supermarin
2
460
Launch Arguments - the mysteries
supermarin
1
210
Swift for CLI tools
supermarin
16
25k
CocoaPods intro
supermarin
2
230
Private pods - best practices
supermarin
1
180
Alcatraz internals
supermarin
2
290
ObjectiveSugar & ObjectiveRecord
supermarin
5
560
Alcatraz - Xcode package manager
supermarin
3
310
BubbleWrap
supermarin
3
330
Other Decks in Programming
See All in Programming
CSC509 Lecture 08
javiergs
PRO
0
260
技術的負債の正体を知って向き合う
irof
0
270
bootcamp2025_バックエンド研修_WebAPIサーバ作成.pdf
geniee_inc
0
140
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
510
他言語経験者が Golangci-lint を最初のコーディングメンターにした話 / How Golangci-lint Became My First Coding Mentor: A Story from a Polyglot Programmer
uma31
0
440
Amazon Verified Permissions実践入門 〜Cedar活用とAppSync導入事例/Practical Introduction to Amazon Verified Permissions
fossamagna
2
100
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.6k
組込みだけじゃない!TinyGo で始める無料クラウド開発入門
otakakot
2
380
CSC305 Lecture 12
javiergs
PRO
0
230
開発組織の戦略的な役割と 設計スキル向上の効果
masuda220
PRO
10
1.7k
理論と実務のギャップを超える
eycjur
0
180
社会人になっても趣味開発を続けたい! / traPavilion
mazrean
1
100
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
640
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Producing Creativity
orderedlist
PRO
347
40k
Embracing the Ebb and Flow
colly
88
4.9k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
How STYLIGHT went responsive
nonsquared
100
5.9k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
Transcript
CLI APPS. FOR FUN AND PROFIT @SUPERMARIN
WHEN FUNCTIONALITY NOT SUPPORTED BY GUI IT'S HARD TO AUTOMATE
TASKS ENDLESS POSSIBILITIES
HOW DO I RUBY, GO, PYTHON, EVEN OBJECTIVE-C
PIPELINE CAT BUILD.LOG | GREP ERROR | WC -L
STATUS CODES $ XCODEBUILD | TEE XCODEBUILD.LOG | XCPRETTY
XCODEBUILD FAILS, STATUS 0
PIPESTATUS [] $ xcodebuild | tee output.log | xcpretty $?
=> 0 ${PIPESTATUS[0]} => 65 ${PIPESTATUS[2]} => 0 $ xcodebuild | tee output.log | xcpretty; exit ${PIPESTATUS[0]}
SET -O PIPEFAIL $ xcodebuild | tee output.log | xcpretty
$ echo $? => 65
BEWARE OF YOUR $SHELL | $SHELL | Exit status |
Pipe status | Set a var | |--------|-------------|---------------|-------------| | bash | $? | $PIPESTATUS | export VAR= | |--------|-------------|---------------|-------------| | zsh | $status | $pipestatus | export VAR= | |--------|-------------|---------------|-------------| | fish | $status | / | set -x VAR |
#! #!/USR/BIN/ENV RUBY
POSIX FLAGS $ COMMAND --VERBOSE --COLOR = $ COMMAND -VC
(ONLY IN SILICON VALLEY)
CLI FRAMEWORKS DON'T DIY
XCPRETTY GITHUB.COM/SUPERMARIN/XCPRETTY
SUCH HTML
WHY IN THE WORLD? THERE'S XCTOOL
XCTOOL(XCODEBUILD) -FLAG -FLAG WRAPPING XCODEBUILD, RECREATING FLAGS
XCODEBUILD -FLAG -FLAG | XCPRETTY USING VANILLA XCODEBUILD
XCTOOL - TESTS maintaining separate settings XCODEBUILD - BETA XCODEBUILD
- APPSTORE maintaining separate settings
USED BY RUBYMOTION FACEBOOK (POP) AFNETWORKING KIWI YAMMER THOUGHTBOT MANY
OTHERS
<3 HIPBYTE YAMMER @KATTRALI