imfo
v1.0.4
Published
Get system info in an easy, consistent, cross-platform way.
Downloads
2
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