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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
470
Launch Arguments - the mysteries
supermarin
1
230
Swift for CLI tools
supermarin
16
25k
CocoaPods intro
supermarin
2
240
Private pods - best practices
supermarin
1
180
Alcatraz internals
supermarin
2
320
ObjectiveSugar & ObjectiveRecord
supermarin
5
570
Alcatraz - Xcode package manager
supermarin
3
330
BubbleWrap
supermarin
3
340
Other Decks in Programming
See All in Programming
Architectural Extensions
denyspoltorak
0
290
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
730
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
Fluid Templating in TYPO3 14
s2b
0
130
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
180
要求定義・仕様記述・設計・検証の手引き - 理論から学ぶ明確で統一された成果物定義
orgachem
PRO
1
130
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
200
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
Fragmented Architectures
denyspoltorak
0
160
CSC307 Lecture 06
javiergs
PRO
0
690
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
Featured
See All Featured
Faster Mobile Websites
deanohume
310
31k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Google's AI Overviews - The New Search
badams
0
910
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
110
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Color Theory Basics | Prateek | Gurzu
gurzu
0
200
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
120
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
190
Building Applications with DynamoDB
mza
96
6.9k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
180
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