envinfo
Info about your dev environment for debugging purposes
Last updated 7 years ago by tabrindle .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install envinfo 
SYNC missed versions from official npm registry.

envinfo generates a report of the common details needed when troubleshooting software issues, such as your operating system, binary versions, browsers, installed languages, and more


Build Status npm version npm downloads per month License: MIT

The problem

  • It works on my computer
  • "command not found"
  • what version of "command" are you running?
  • what version of "different command" are you running?
  • do you have "insert obscure android sdk version"?
  • every github issue reporting template ever:

Please mention other relevant information such as the browser version, Node.js version, Operating System and programming language.

This solution

  • Gather all of this information in one spot, quickly, and painlessly.

Installation

To use as a CLI tool, install this package globally:

npm install -g envinfo || yarn global add envinfo

Or, use without installing with npx:

npx envinfo

To use as a library in another project:

npm install envinfo || yarn add envinfo

CLI Usage

envinfo || npx envinfo

System:
  OS: macOS High Sierra 10.13
  CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
  Free Memory: 4.01 GB
  Total Memory: 16.00 GB
  Shell: /usr/local/bin/bash - 4.4.12
Binaries:
  Node: 8.9.4
  Yarn: 1.3.2
  npm: 5.6.0
  Watchman: 4.9.0
  Docker: 17.12.0-ce, build c97c6d6
  Homebrew: 1.5.4
SDKs:
  iOS:
    Platforms: iOS 11.0, macOS 10.13, tvOS 11.0, watchOS 4.0
  Android:
    Build Tools: 27.0.3
    API Levels: 26
IDEs:
  Android Studio: 3.0 AI-171.4443003
  Atom: 1.23.3
  VSCode: 1.20.1
  Sublime Text: Build 3143
  Xcode: Xcode 9.0 Build version 9A235
Languages:
  Bash: 4.4.12
  Go: 1.9.3
  PHP: 7.1.7
  Python: 2.7.10
  Ruby: 2.3.3p222
Browsers:
  Chrome: 64.0.3282.167
  Chrome Canary: 66.0.3353.0
  Firefox: 58.0
  Firefox Developer Edition: 57.0
  Firefox Nightly: 58.0a1
  Safari: 11.0
  Safari Technology Preview: 11.1
npmPackages:
  eslint:
    wanted: ^4.10.0
    installed: 4.16.0
  ...
  yamlify-object:
    wanted: ^0.4.5
    installed: 0.4.5
npmGlobalPackages:
  create-react-native-app: 1.0.0
  exp: 49.2.2
  lerna: 2.7.1
  npm: 5.6.0
  npm-check-updates: 2.14.0
  react-native-cli: 2.0.1

Programmatic Usage

Envinfo takes a configuration object and returns a string (optionally yaml, json or markdown)

import envinfo from 'envinfo';

console.log(
    envinfo.run(
        {
            System: ['OS', 'CPU'],
            Binaries: ['Node', 'Yarn', 'npm'],
            Browsers: ['Chrome', 'Firefox', 'Safari'],
            npmPackages: ['styled-components', 'babel-plugin-styled-components'],
        },
        { json: true }
    )
);

returns:

{
  "System": {
    "OS": "macOS High Sierra 10.13",
    "CPU": "x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz"
  },
  "Binaries": {
    "Node": "8.9.4",
    "Yarn": "1.3.2",
    "npm": "5.6.0"
  },
  "Browsers": {
    "Chrome": "65.0.3325.146",
    "Firefox": 58.0,
    "Safari": 11.0
  },
  "npmPackages": {
    "styled-components": {
      "wanted": "^3.2.1",
      "installed": "3.2.1"
    },
    "babel-plugin-styled-components": {
      "wanted": "^1.5.1",
      "installed": "1.5.1"
    }
  }
}

All of envinfo's helpers are also exported for use. You can use envinfo as a whole, or just the parts that you need, like this:

import { helpers } from 'envinfo';

const OS = helpers.getOperatingSystemInfo();
const docker = helpers.getDockerVersion();

console.log({ OS, docker });
{
 OS: 'macOS High Sierra 10.13'
 docker: '17.12.0-ce, build c97c6d6'
}

CLI Options

    --system               Print general system info such as OS, CPU, Memory and Shell
    --browsers             Get version numbers of installed web browsers
    --SDKs                 Get platforms, build tools and SDKs of iOS and Android
    --IDEs                 Get version numbers of installed IDEs
    --languages            Get version numbers of installed languages such as Java, Python, PHP, etc
    --binaries             Get version numbers of node, npm, watchman, etc
    --npmPackages          Get version numbers of locally installed npm packages - glob, string, or comma delimited list
    --npmGlobalPackages    Get version numbers of globally installed npm packages

    --duplicates           Mark duplicate npm packages inside parentheses eg. (2.1.4)
    --fullTree             Traverse entire node_modules dependency tree, not just top level

    --markdown             Print output in markdown format
    --json                 Print output in JSON format
    --console              Print to console (defaults to on for CLI usage, off for programmatic usage)
    --clipboard            Copy output to your system clipboard (uses clipboardy)

Integration

envinfo is live in:

envinfo is used in the ISSUE_TEMPLATE of:

Contributing

PRs for additional features are welcome! Run npm run lint && npm run format before committing.

This project came out of a PR to the React Native CLI tool - issues are reported frequently without important environment information, like Node/npm versions.

Alternatives

  • type $ command -v until you smash your computer
  • screenfetch - fetch system and terminal information, and display a pretty ascii logo
  • Solidarity - a project based environment checker
  • write your own

License

MIT

Current Tags

  • 7.14.0                                ...           latest (3 months ago)
  • 5.1.1                                ...           next (7 years ago)

89 Versions

  • 7.14.0                                ...           3 months ago
  • 7.13.0                                ...           8 months ago
  • 7.12.0                                ...           9 months ago
  • 7.11.1                                ...           a year ago
  • 7.11.0                                ...           a year ago
  • 7.10.0                                ...           a year ago
  • 7.9.0                                ...           2 years ago
  • 7.8.1                                ...           4 years ago
  • 7.8.0                                ...           4 years ago
  • 7.7.4                                ...           4 years ago
  • 7.7.3                                ...           4 years ago
  • 7.7.2                                ...           4 years ago
  • 7.7.1                                ...           4 years ago
  • 7.7.0                                ...           4 years ago
  • 7.6.0                                ...           4 years ago
  • 7.5.1                                ...           5 years ago
  • 7.5.0                                ...           5 years ago
  • 7.4.0                                ...           5 years ago
  • 7.3.1                                ...           6 years ago
  • 7.3.0                                ...           6 years ago
  • 7.2.0                                ...           6 years ago
  • 7.1.0                                ...           6 years ago
  • 7.0.0                                ...           6 years ago
  • 6.0.1                                ...           6 years ago
  • 6.0.0                                ...           6 years ago
  • 5.12.1                                ...           6 years ago
  • 5.12.0                                ...           6 years ago
  • 5.11.1                                ...           6 years ago
  • 5.11.0                                ...           6 years ago
  • 5.10.0                                ...           7 years ago
  • 5.9.0                                ...           7 years ago
  • 5.8.1                                ...           7 years ago
  • 5.8.0                                ...           7 years ago
  • 5.7.0                                ...           7 years ago
  • 5.6.0                                ...           7 years ago
  • 5.4.0                                ...           7 years ago
  • 5.3.0                                ...           7 years ago
  • 5.2.0                                ...           7 years ago
  • 5.1.2                                ...           7 years ago
  • 5.1.1                                ...           7 years ago
  • 5.1.0                                ...           7 years ago
  • 5.0.1                                ...           7 years ago
  • 5.0.0                                ...           7 years ago
  • 4.4.2                                ...           7 years ago
  • 4.4.1                                ...           7 years ago
  • 4.4.0                                ...           7 years ago
  • 4.3.1                                ...           7 years ago
  • 4.3.0                                ...           7 years ago
  • 4.2.1                                ...           7 years ago
  • 4.2.0                                ...           7 years ago
  • 4.1.0                                ...           7 years ago
  • 4.0.2                                ...           7 years ago
  • 4.0.1                                ...           7 years ago
  • 4.0.0                                ...           7 years ago
  • 4.0.0-beta.12                                ...           7 years ago
  • 4.0.0-beta.11                                ...           7 years ago
  • 4.0.0-beta.10                                ...           7 years ago
  • 4.0.0-beta.9                                ...           7 years ago
  • 4.0.0-beta.8                                ...           7 years ago
  • 4.0.0-beta.7                                ...           7 years ago
  • 4.0.0-beta.6                                ...           7 years ago
  • 4.0.0-beta.5                                ...           7 years ago
  • 4.0.0-beta.4                                ...           7 years ago
  • 4.0.0-beta.3                                ...           7 years ago
  • 4.0.0-beta.2                                ...           7 years ago
  • 4.0.0-beta.1                                ...           7 years ago
  • 3.11.1                                ...           7 years ago
  • 3.11.0                                ...           7 years ago
  • 3.10.0                                ...           7 years ago
  • 3.9.1                                ...           7 years ago
  • 3.9.0                                ...           7 years ago
  • 3.8.0                                ...           7 years ago
  • 3.7.0                                ...           7 years ago
  • 3.6.0                                ...           7 years ago
  • 3.5.0                                ...           7 years ago
  • 3.4.2                                ...           7 years ago
  • 3.4.1                                ...           7 years ago
  • 3.4.0                                ...           7 years ago
  • 3.3.0                                ...           7 years ago
  • 3.2.1                                ...           7 years ago
  • 3.2.0                                ...           7 years ago
  • 3.1.0                                ...           7 years ago
  • 3.0.0                                ...           7 years ago
  • 2.2.0                                ...           8 years ago
  • 2.1.0                                ...           8 years ago
  • 2.0.2                                ...           8 years ago
  • 2.0.1                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Total 90
Today 0
This Week 0
This Month 88
Last Day 0
Last Week 88
Last Month 0
Dependencies (0)
None
Dev Dependencies (19)

© 2010 - cnpmjs.org x YWFE | Home | YWFE