imfo

Get system info in an easy, consistent, cross-platform way.

Usage no npm install needed!

<script type="module">
  import imfo from 'https://cdn.skypack.dev/imfo';
</script>

README

imfo

Get system info in an easy, consistent, cross-platform way.

Compared to parsing the output of ifconfig or ip route, the 'os' module in Node.js is very easy to use.

> npx imfo --ip
192.168.1.12

You can also get the whole os object to have cross-platform access to things like homedir hostname userInfo.username and others.

> npx imfo | jq -r '.userInfo.username'
kronk

> npx imfo | jq -r '.tmpdir'
/tmp

> npx imfo | jq -r '.cpus | length'
8