Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
Transcript
14 slides
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?
Other Decks in Programming
See All in Programming
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
2
170
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
120
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
350
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
680
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
230
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
250
imagewebp()の向こう側: WebPはなぜ JPEG・PNGより軽いのか
yuzneri
0
110
LLM 101
dalinaum
0
500
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
1
240
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
Vapor Mode でアクセシビリティは 壊れないか検証した話
fuqda
1
350
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
180
Featured
See All Featured
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
60k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
AI: The stuff that nobody shows you
jnunemaker
PRO
12
1.3k
Rails Girls Zürich Keynote
gr2m
96
14k
Abbi's Birthday
coloredviolet
5
11k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Odyssey Design
rkendrick25
PRO
3
950
Joys of Absence: A Defence of Solitary Play
codingconduct
1
580
Building the Perfect Custom Keyboard
takai
2
960
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Practical Orchestrator
shlominoach
192
12k