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
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
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
2.5k
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
3
690
20260514_its_the_context_window_stupid.pdf
heita
0
180
Explore CoroutineScope
tomoeng11
0
160
実用!Hono RPC2026
yodaka
2
300
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
410
JOAI2026 1st solution - heron0519 -
heron0519
0
180
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
370
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
170
継続的な負荷検証を目指して
pyama86
0
210
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
220
From Formal Specification to Property Based Test
ohbarye
0
710
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
160
Navigating Weather and Climate Data
rabernat
0
180
RailsConf 2023
tenderlove
30
1.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
How to Ace a Technical Interview
jacobian
281
24k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.3k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
530
The Cult of Friendly URLs
andyhume
79
6.9k
A Soul's Torment
seathinner
6
2.8k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
240
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
560
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?