spt-cli

0.0.7 • Public • Published

spt-cli

NPM License Downloads

internet connection speed and ping and so on

Install

ensure you have Node.js version 8+ installed. Then run the following:

$ npm install -g spt-cli

Usage

$ spt -h
 
  Usage: spt <command> [options]
  Options:
    -V, --version        output the version number
    -h, --help           output usage information
 
  Commands:
    test                 test network speet
    ip [options] [host]  get ip address the local or input host public or internal
 

### SubCmd Usage

  • test
$ spt test -h
Usage: spt test [options]
 
test network speet
 
Options:
  -b --bytes [boolean]  output the result in megabytes per second (MBps) (default: false)
  -t --time [number]    the maximum length (in ms) of a single test run (upload or download) (default: 3000)
  -p --proxy [url]      The proxy for upload or download, support http and https
  -h, --help            output usage information
 
  • list
  $ spt list -h
  Usage: spt list [options] [line]
 
show network speet history
 
Options:
  -c --clear [boolean]    clear all network speet history (default: false)
  -b --bytes [boolean]    output the result in megabytes per second (MBps) (default: false)
  -v --verbose [boolean]  output more detailed information (default: false)
  -h, --help              output usage information
 
Examples:
 
    # 展示网络测速记录 默认最新的3条 
    $ spt list
 
    # 展示 6条 网络测速详细记录 
    $ spt list 6 -v
 
    # 清除所有的网络测速记录 
    $ spt list -c
  • ip
$ spt ip -h
Usage: spt ip [options] [host]
 
get ip address the local or input host public or internal
 
Options:
  -t --type [type]  select network type (default: "all")
  -h, --help        output usage information
 
Examples:
 
    # 获取本机的公网和局域网ip 
    $ spt ip
 
    # 只获取本机的公网地址 
    $ spt ip -t public
 
    # 获取指定网址的公网地址 
    $ spt ip baidu.com

Show your support

Give a ⭐️ if this project helped you!

License

MIT

Package Sidebar

Install

npm i spt-cli

Weekly Downloads

1

Version

0.0.7

License

MIT

Unpacked Size

72.9 kB

Total Files

44

Last publish

Collaborators

  • gaoyanhui