npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

macos-smc

v1.0.2

Published

SMC reader for macOS on Apple Silicon: temperatures, frequencies, power and fans

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

NPM Version NPM Downloads Git Issues MIT license

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-smc

Requires 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 [] from fans().
  • mhz is the residency-weighted frequency while active. usage is 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 return null for 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 publish

Credits

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 MIT license

The MIT License (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.