package
Info about your dev environment for debugging purposes
npm install envinfoGitHub-flavored package documentation.
Across all versions, last 30 days.
87,805,057 in 30 days
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
163.9 kB
Includes dependencies.
Please mention other relevant information such as the browser version, Node.js version, Operating System and programming language.
To use as a CLI tool, install this package globally:
npm install -g envinfo || yarn global add envinfoOr, use without installing with npx:
npx envinfo
To use as a library in another project:
npm install envinfo || yarn add envinfoenvinfo || npx envinfo
System:
OS: macOS Mojave 10.14.5
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Memory: 2.97 GB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.16.0 - ~/.nvm/versions/node/v8.16.0/bin/node
Yarn: 1.15.2 - ~/.yarn/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v8.16.0/bin/npm
pnpm: 8.7.6 - /usr/local/bin/pnpm
bun: 1.0.2 - /usr/local/bin/bun
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
Cargo: 1.31.0 - ~/.cargo/bin/cargo
Envinfo takes a configuration object and returns a Promise that resolves a string (optionally yaml, json or markdown)
import envinfo from 'envinfo';
envinfo.run(
{
System: ['OS', 'CPU'],
Binaries: ['Node', 'Yarn', 'npm'],
Browsers: ['Chrome', 'Firefox', 'Safari'],
npmPackages: ['styled-components', 'babel-plugin-styled-components'],
},
{ json: true, showNotFound: true }
).then(env => console.log(env));logs:
{
"System": {
"OS": "macOS High Sierra 10.13",
"CPU": "x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz"
},
"Binaries": {
"Node": {
"version": "8.11.0",
"path": "~/.nvm/versions/node/v8.11.0/bin/node"
},
"Yarn": {
"version": "1.5.1",
"path": "~/.yarn/bin/yarn"
},
"npm": {
"version": "5.6.0",
"path": "~/.nvm/versions/node/v8.11.0/bin/npm"
}
},
"Browsers": {
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:
const envinfo = require('envinfo');
// each helper returns a promise
const node = await envinfo.helpers.getNodeInfo();
// The promises resolve to an array of values: ["Name", "Version", "Path"]
// e.g. ["Node", "10.9.0", "/usr/local/bin/node"]
console.log(`Node: ${node[1]} - ${node[2]}`); // "Node: 10.9.0 - ~/.nvm/versions/node/v8.14.0/bin/node" --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)envinfo is live in:
react-native info)create-react-app --info)npx expo-env-info)webpack-cli info)envinfo is used in the ISSUE_TEMPLATE of:
command -v until you smash your computerMIT
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.
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
gantman
gantman+npm@gmail.com
solidarity reportgatsby info)Gant Laborde 📝 🐛 💻 🤔 |
|---|
Anton Fisher 🐛 💻 |
|---|
Ahmad Awais ⚡️ 🐛 💻 |
|---|
Hasan 🐛 💻 |
|---|
Ernesto Ramírez 🐛 💻 |
|---|
Jiawen Geng 🐛 💻 🤔 ⚠️ |
|---|
Zac Anger 💻 🐛 | Ville Immonen 🐛 💻 | Olmo Maldonado 🐛 💻 | Rishabh Chawla 🐛 💻 | Carl Taylor 💻 |