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
Building Command Line Interfaces In Node.JS
Search
domharrington
May 11, 2012
Programming
400
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Building Command Line Interfaces In Node.JS
http://lanyrd.com/2012/lnug-april/
domharrington
May 11, 2012
Other Decks in Programming
See All in Programming
スマートグラスで並列バイブコーディング
hyshu
0
270
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.4k
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
200
The NotImplementedError Problem in Ruby
koic
1
990
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
220
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
140
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
210
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
810
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
180
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
170
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
240
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
130
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
340
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
270
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Documentation Writing (for coders)
carmenintech
77
5.4k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
280
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Typedesign – Prime Four
hannesfritz
42
3.1k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
210
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
760
Transcript
BUILDING COMMAND LINE INTERFACES IN Node.JS 1 Copyright © 2012
Clock Limited Clock ® is a registered trademark of Clock limited in the EU and other territories Registered in England and Wales No.3457724 VAT Registered No. 706 7654 20
@domharrington 2 WHO AM I? Github: domharrington
'process' module Arguments accessible via 'process.argv' Array of arguments 3
COMMAND- LINE IN NODE
4
Perfectly fine if you only need one argument E.g. accessing
the first argument: process.argv[2] Parsing of options becomes unmanageable 5 PROBLEMS WITH THIS APPROACH
Module to help ease the pain of parsing command-line options
Simple, natural API Auto generated --help and --version 6 COMMANDER.JS https://github.com/visionmedia/commander.js/
7
8
Options don't need to be defined All options are parsed
automatically Also has default values, aliases Many more features 9 NODE-OPTIMIST https://github.com/substack/node-optimist
10
11
aparser cli node-arguments And many more … 12 SOME MORE
LIBRARIES
13 WHERE HAVE I USED IT? https://github.com/domharrington/gitme
14 ANY QUESTIONS?