macos-smc
v1.0.2
Published
SMC reader for macOS on Apple Silicon: temperatures, frequencies, power and fans
Maintainers
Readme
macos-smc
Hardware sensor library for node.js on macOS (Apple Silicon): CPU/GPU temperatures, CPU/GPU frequencies and utilization, power draw and fans.
___ ____
_ __ ___ __ _ ___ / _ \/ ___| ___ _ __ ___ ___
| '_ ` _ \ / _` |/ __| | | \___ \ _____/ __| '_ ` _ \ / __|
| | | | | | (_| | (__| |_| |___) |_____\__ \ | | | | | (__
|_| |_| |_|\__,_|\___|\___/|____/ |___/_| |_| |_|\___|
macOS (Apple Silicon - ARM) - SMC hardware sensor library
Quick Start
- Zero runtime dependencies (native Node-API addon)
- macOS 12+, Apple Silicon (arm64) only
- No
sudo, no child processes - All temperatures in °C, power in W, frequencies in MHz, usage in percent (0–100)
Installation
npm install macos-smcRequires Xcode command-line tools (xcode-select --install).
Usage
const smc = require("macos-smc");
smc.chip();
// { name: 'Apple M5 Max', model: 'Mac17,7', generation: 5, variant: 'Max', cpuCores: 18,
// tiers: [{ name: 'Super', cores: 6 }, { name: 'Performance', cores: 12 }], gpuCores: 40, memoryBytes }
smc.temperatures();
// { cpu: { max, avg, sensors }, gpu: { max, avg, sensors }, battery, ssd, wifi }
smc.fans();
// [{ id, rpm, min, max, target, percent }]
await smc.sample(1000);
// {
// interval,
// cpu: { mhz, usage, watts, tiers: [{ name, cores, mhz, maxMhz, usage }], cores: [{ name, tier, mhz, usage }] },
// gpu: { mhz, maxMhz, usage, watts },
// ane: { watts }, dram: { watts },
// system: { watts, adapterWatts, socHeatWatts }
// }Reference
- Unavailable values are
null. Fanless machines return[]fromfans(). mhzis the residency-weighted frequency while active.usageis the active residency.- Details on the SMC keys and data sources: docs/smc-keys.md
Known Issues
- On macOS 27, CPU, ANE and DRAM energy counters update only every ~2 s. The first
sample()call may therefore returnnullfor these watts; later calls reuse the last counter update. - Verified on M5 Max. M1–M4 and Ultra are implemented from public reverse-engineering sources (see docs/smc-keys.md). Reports from other chips are welcome via issues.
News and Changes
| Version | Date | Comment | | ------- | ---------- | ------------------------------- | | 1.0.1 | 2026-09-26 | code refinements / refactorings | | 1.0.0 | 2026-09-26 | first major relase | | 0.1.0 | 2026-09-25 | initial release |
Release Info
npm run build && npm test
npx biome check .
npm pack --dry-run
npm version patch/minor/major
git push
git push --tags
npm publishCredits
Written by Sebastian Hildebrandt sebhildebrandt
Copyright Information
Apple and macOS are registered trademarks of Apple Inc., Node.js is a trademark of OpenJS Foundation. ARM is a registered trademarks of Arm Limited. All other trademarks are the property of their respective owners.
License 
The
MITLicense (MIT)Copyright © 2026 Sebastian Hildebrandt, +innovations.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Further details see LICENSE file.
