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
450
Launch Arguments - the mysteries
supermarin
1
170
Swift for CLI tools
supermarin
16
25k
CocoaPods intro
supermarin
2
210
Private pods - best practices
supermarin
1
140
Alcatraz internals
supermarin
2
250
ObjectiveSugar & ObjectiveRecord
supermarin
5
510
Alcatraz - Xcode package manager
supermarin
3
280
BubbleWrap
supermarin
3
310
Other Decks in Programming
See All in Programming
HTML/CSS超絶浅い説明
yuki0329
0
190
Оптимизируем производительность блока Казначейство
lamodatech
0
960
Azure AI Foundryのご紹介
qt_luigi
1
210
令和7年版 あなたが使ってよいフロントエンド機能とは
mugi_uno
10
5.2k
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
1
590
ecspresso, ecschedule, lambroll を PipeCDプラグインとして動かしてみた (プロトタイプ) / Running ecspresso, ecschedule, and lambroll as PipeCD Plugins (prototype)
tkikuc
2
1.9k
Fixstars高速化コンテスト2024準優勝解法
eijirou
0
190
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
550
はてなにおけるfujiwara-wareの活用やecspressoのCI/CD構成 / Fujiwara Tech Conference 2025
cohalz
3
2.8k
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
3
190
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
1.4k
良いユニットテストを書こう
mototakatsu
11
3.6k
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
182
22k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
Navigating Team Friction
lara
183
15k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Statistics for Hackers
jakevdp
797
220k
Typedesign – Prime Four
hannesfritz
40
2.5k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Documentation Writing (for coders)
carmenintech
67
4.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
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