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

sysprobe

v0.1.8

Published

Small TypeScript system probe library and CLI.

Downloads

1,292

Readme

sysprobe

A small TypeScript system probe library and CLI for reading CPU temperature and Linux fan RPM sensors.

The package does not require sudo, does not control fan speed, and never fakes sensor values. Unsupported readings are reported as unsupported in the CLI and as supported: false or null in the API.

Features

  • Read CPU temperature when supported by the system
  • Read Linux fan RPM sensors from /sys/class/hwmon/*/fan*_input
  • Read storage, graphics/GPU, display, input device, and battery information
  • Watch CPU, RAM, temperature, and fan readings in realtime
  • CLI support for quick diagnostics
  • TypeScript-first API
  • Safe fallback behavior for unsupported hardware sensors

Requirements

  • Node.js 24 or newer
  • pnpm for local development

CPU temperature readings use systeminformation.cpuTemperature() first. If that is unsupported, sysprobe tries Linux hwmon temperature files from /sys/class/hwmon/*/temp*_input, then the optional macOS osx-cpu-temp command.

Fan RPM readings use Linux /sys/class/hwmon/*/fan*_input files first. If no Linux fan sensors are available, sysprobe tries the optional macOS smc command.

Optional macOS helpers are not bundled. Install compatible helper commands separately if you want macOS temperature or fan support:

brew install osx-cpu-temp
# install an `smc` command compatible with: smc -k F0Ac -r

If those commands are unavailable, macOS temperature and fan values remain unsupported.

Sensor availability depends on the operating system, hardware vendor, drivers, permissions, and whether the sensor data is exposed by the system.

Installation

npm install sysprobe

Or with pnpm:

pnpm add sysprobe

CLI

Run a one-time sensor snapshot:

npx sysprobe sensors

Example output:

Sensors
  CPU Temp: 62°C
  CPU Max : 71°C
  Fan 1   : 1280 RPM
  Fan 2   : 940 RPM

Watch CPU, RAM, temperature, and the first fan once per second:

npx sysprobe watch --sensors

Example output:

CPU: 18.4% | RAM: 61.2% | Temp: 62°C | Fan: 1280 RPM

Read hardware details:

npx sysprobe hardware

Example output:

Hardware
  Storage:
    1. Apple SSD | total: 953.9 GiB | used: 381.5 GiB | free: 572.4 GiB | health: Verified | serial: SSD123
  GPU:
    1. Apple Apple M3 | vram: unknown | temp: 55°C
  Displays:
    1. Color LCD | 1512x982 | 120 Hz | serial: DISPLAY123
  Battery: 65%
  Keyboards: USB Keyboard
  Mice: Magic Mouse
  Trackpads: Magic Trackpad

Read detailed macOS-style hardware categories when system_profiler is available:

npx sysprobe hardware --details

This includes categories such as Hardware, Memory, NVMExpress, Storage, Graphics/Displays, Power, USB, Bluetooth, Audio, Camera, Card Reader, Ethernet, Network, Thunderbolt/USB4, Printers, PCI, and SATA.

Library API

import { getHardware, getSensors, watchSensors } from "sysprobe";

const snapshot = await getSensors();
const hardware = await getHardware();

console.log(snapshot.cpuTemperature.main);
console.log(snapshot.fans);
console.log(hardware.storage);
console.log(hardware.gpus);
console.log(hardware.displays);

const watcher = watchSensors({ intervalMs: 1000 });

watcher.on("data", (snapshot) => {
  console.log(snapshot.cpuUsagePercent, snapshot.ramUsagePercent);
});

watcher.stop();

Sensor Support

CPU temperature and fan speed readings are collected on a best-effort basis.

Hardware details are collected from systeminformation providers such as fsSize(), diskLayout(), blockDevices(), graphics(), battery(), usb(), and bluetoothDevices().

Detailed hardware categories are collected from macOS system_profiler -json when available.

Not all systems expose temperature, fan, storage health, serial numbers, input devices, or battery data. When a value cannot be read, sysprobe returns null, unknown, or an unsupported state instead of fake or unreliable values.

This package is read-only. It does not control fan speed, modify hardware settings, or require sudo.

Development

Install dependencies:

pnpm install

Run unit tests:

pnpm test

Run linting and formatting checks:

pnpm lint
pnpm format:check

Build the package:

pnpm build

License

MIT