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
15
25k
CocoaPods intro
supermarin
2
200
Private pods - best practices
supermarin
1
140
Alcatraz internals
supermarin
2
250
ObjectiveSugar & ObjectiveRecord
supermarin
5
500
Alcatraz - Xcode package manager
supermarin
3
280
BubbleWrap
supermarin
3
310
Other Decks in Programming
See All in Programming
cmp.Or に感動した
otakakot
3
210
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
300
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
Arm移行タイムアタック
qnighy
0
340
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
EMになってからチームの成果を最大化するために取り組んだこと/ Maximize team performance as EM
nashiusagi
0
100
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.2k
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
340
受け取る人から提供する人になるということ
little_rubyist
0
250
Modular Monolith Monorepo ~シンプルさを保ちながらmonorepoのメリットを最大化する~
yuisakamoto
2
130
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
300
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
340
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
327
21k
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
380
A designer walks into a library…
pauljervisheath
204
24k
Visualization
eitanlees
145
15k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Navigating Team Friction
lara
183
14k
How to Ace a Technical Interview
jacobian
276
23k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Designing Experiences People Love
moore
138
23k
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