doctor.ts 503 字节
Newer Older
1
#!/usr/bin/env node
2 3 4 5 6 7 8
/**
 * Wechaty - Wechat for Bot. Connecting ChatBots
 *
 * Licenst: ISC
 * https://github.com/wechaty/wechaty
 *
 */
9

Huan (李卓桓)'s avatar
Huan (李卓桓) 已提交
10 11
import * as os from 'os'

12 13 14 15 16 17 18 19
import {
    Config
  , Wechaty
} from '../'

const wechaty = Wechaty.instance()

console.log(`
20
#### Wechaty Doctor
21 22

1. Wechaty version: ${wechaty.version()}
23
2. ${os.type()} ${os.arch()} version ${os.release()} memory ${Math.floor(os.freemem() / 1024 / 1024)}/${Math.floor(os.totalmem() / 1024 / 1024)} MB
24 25
3. Docker: ${Config.isDocker}
`)