This package has been deprecated

Author message:

This package was renamed to macos-system-info

smc-node-kit
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

smc-node-kit

Build Status npm

Library to easily communicate with the Apple SMC through Node.js

Installation

npm install smc-node-kit

or

yarn add smc-node-kit

Documentation

You can find the documentation here.

Usage

This little code snipped shows how to read the current CPU temperature:

// import the class
const { SMCNodeKit } = require('smc-node-kit');

// create a new instance of the class and open the connection to the SMC
const smcKit = new SMCNodeKit();
smcKit.open();

// read the cpu temperature
console.log(smcKit.getCpuTemp());

// close the connection to the SMC
smcKit.close();

If you are using typescript you can use named imports:

// import the class
import { SMCNodeKit } from 'smc-node-kit';

// create a new instance of the class and open the connection to the SMC
const smcKit: SMCNodeKit = new SMCNodeKit();
smcKit.open();

// read the cpu temperature
console.log(smcKit.getCpuTemp());

// close the connection to the SMC
smcKit.close();

Readme

Keywords

Package Sidebar

Install

npm i smc-node-kit

Weekly Downloads

0

Version

1.2.0

License

MIT

Unpacked Size

105 kB

Total Files

19

Last publish

Collaborators

  • d0mih