https://github.com/pengjielee/xun-cli
一个Nodejs命令行工具,可以查看日期、查看天气、查看本机IP地址。
https://github.com/pengjielee/xun-cli
cli node-cli
Last synced: 5 months ago
JSON representation
一个Nodejs命令行工具,可以查看日期、查看天气、查看本机IP地址。
- Host: GitHub
- URL: https://github.com/pengjielee/xun-cli
- Owner: pengjielee
- Created: 2020-12-21T10:04:22.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-05-05T07:24:32.000Z (about 3 years ago)
- Last Synced: 2025-08-09T19:37:15.760Z (10 months ago)
- Topics: cli, node-cli
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/xun-cli
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
一个Nodejs命令行工具,可以查看日期、查看天气、查看本机IP地址、创建.gitignore文件、创建.prettierrc.js文件。
## 全局安装
```bash
$ npm install -g xun-cli
```
## 使用
1. 查看日期
```bash
$ xun-cli date
```
2. 查看指定城市天气
默认显示北京的天气,支持的城市有北京、上海、天津、杭州、成都、郑州。
```bash
$ xun-cli weather
$ xun-cli weather shanghai
$ xun-cli weather tianjin
$ xun-cli weather hangzhou
$ xun-cli weather chengdu
$ xun-cli weather zhenzhou
```
3. 查看热门城市天气
```bash
$ xun-cli hot
```
4. 查看本机IP地址
```bash
$ xun-cli ip
```
5. 查看帮助
```bash
$ xun-cli help
```
6. 创建.gitignore文件
```bash
$ xun-cli git
```
7. 创建.prettierrc.js文件
```bash
$ xun-cli prettier
```
8. Serve a static site
```bash
$ xun-cli serve
$ xun-cli serve 3000
```