# CLI
Node.js CLI 应用程序最佳实践 (opens new window)
# 本地开发
- npm init -y
- package.json 添加 bin 字段
- bin文件使用node解析:
#!/usr/bin/env node
- npm link
# 命令行美化
- figlet
- @darkobits/lolcatjs
# 依赖库
- commander (yargs (opens new window) minimist (opens new window))
- inquirer
- shelljs
- ora
- clear
- chalk
- semver
← 事件循环