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
3
400
Building Command Line Interfaces In Node.JS
http://lanyrd.com/2012/lnug-april/
domharrington
May 11, 2012
Tweet
Share
Other Decks in Programming
See All in Programming
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
ThorVG Viewer In VS Code
nors
0
760
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
640
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
100
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
420
Oxlint JS plugins
kazupon
1
770
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
Featured
See All Featured
Making Projects Easy
brettharned
120
6.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
The SEO Collaboration Effect
kristinabergwall1
0
350
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Automating Front-end Workflow
addyosmani
1371
200k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
The browser strikes back
jonoalderson
0
360
Building Applications with DynamoDB
mza
96
6.9k
Documentation Writing (for coders)
carmenintech
77
5.2k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
36k
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?