Skip to content

About

Dependency-free macOS TUI temperature monitor for Apple Silicon with SoC, SSD/NAND, and battery readings, 60-minute trends, local history, and thermal alerts.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

mac-temp: Apple Silicon Temperature Monitor for macOS

License Platform Apple Silicon

mac-temp is a lightweight, dependency-free macOS terminal UI (TUI) temperature monitor for Apple Silicon. It displays real-time SoC, SSD/NAND, and battery temperatures, a rolling 60-minute history, color-coded thermal levels, and high-temperature alerts without sudo or fan control.

It is designed for people searching for an Apple Silicon CPU temperature monitor, macOS thermal monitor, terminal system monitor, or Swift-based TUI for M-series Macs.

┌────────────────────────────────────────────────────────────────────────────────────────┐
│ Sensor               │ Current   │ 60m Min   │ 60m Max   │ Status    │ Last 60 Minutes │
├──────────────────────┼───────────┼───────────┼───────────┼───────────┼─────────────────┤
│ SoC Die Average      │    44.2°C │    42.8°C │    61.4°C │ ● Normal  │ ··········▂▄▃▁ │
│ SoC Die Median       │    44.1°C │    42.7°C │    61.0°C │ ● Normal  │ ··········▂▄▃▁ │
│ SoC Die P90          │    44.8°C │    43.0°C │    63.1°C │ ● Normal  │ ··········▃▅▃▁ │
│ SoC Die Maximum      │    45.0°C │    43.1°C │    64.0°C │ ● Normal  │ ··········▃▅▃▁ │
├──────────────────────┴───────────┴───────────┴───────────┴───────────┴─────────────────┤
│ [q] Quit    [r] Refresh now                                                            │
└────────────────────────────────────────────────────────────────────────────────────────┘

Core features

  • Read-only Apple Silicon temperature sampling through macOS IOKit/HID services.
  • Adaptive TUI layouts for wide and narrow terminal windows.
  • Correct terminal alignment for Unicode and double-width characters.
  • SoC die average, median, P90, and maximum; SoC/PMU proximity average and maximum; SSD/NAND, battery, and available enclosure sensors.
  • Current temperature plus minimum, maximum, and sparkline history for the last 60 minutes.
  • Green, yellow, and red classifications with component-specific thresholds.
  • A prominent warning when a sensor is hot or macOS reports serious/critical thermal pressure.
  • Five-second screen refresh with at most one persisted sample per minute.
  • Automatic deletion of history older than two hours.
  • Local-only operation: no analytics, network calls, accounts, tokens, or cloud services.
  • Interactive q to quit and r to refresh immediately, with terminal state restored on exit.

Requirements

  • An Apple Silicon Mac.

  • macOS with Swift available. Install Apple's Command Line Tools if needed:

    xcode-select --install
  • A UTF-8 terminal with ANSI escape-sequence support.

Intel Macs are not currently supported. Sensor availability and names can vary by Mac model and macOS release because some of the sensor interface is not a stable public API.

Quick start

git clone https://github.com/Bosn/MacOSTUITemperature.git
cd MacOSTUITemperature
chmod +x mac-temp
./mac-temp

No environment file, API key, administrator access, or external package is required.

Install as mac-temp

The installer copies the executable script to ${PREFIX:-$HOME/.local}/bin:

./install.sh

If ~/.local/bin is not already on your PATH, add this to your shell profile:

export PATH="$HOME/.local/bin:$PATH"

Then run:

mac-temp

To choose another installation prefix:

PREFIX=/usr/local ./install.sh

The last command may require appropriate write permissions for the selected prefix.

Usage

Normal use needs no arguments:

mac-temp

Options:

-i, --interval SEC  Refresh interval (default: 5 seconds)
-1, --once          Read once and exit
-a, --all           Include every raw temperature sensor
-p, --plain         Print timestamped lines without the TUI
-v, --version       Show version
-h, --help          Show help

Examples:

# Refresh every two seconds
mac-temp --interval 2

# Inspect every raw sensor exposed by the system
mac-temp --all

# Produce append-friendly text output
mac-temp --plain >> temperature.log

# Read a single snapshot
mac-temp --once

Temperature levels

The built-in values are conservative reference thresholds, not Apple-published hardware limits:

Component Green: normal Yellow: warm Red: hot
Apple Silicon SoC / PMU below 70°C 70–84.9°C 85°C or above
SSD / NAND below 50°C 50–69.9°C 70°C or above
Battery below 35°C 35–39.9°C 40°C or above
Enclosure / ambient sensor below 40°C 40–44.9°C 45°C or above

The macOS ProcessInfo.thermalState signal takes priority. A serious or critical state always triggers a warning because the operating system may already be reducing performance to cool the device.

Read Temperature thresholds for the rationale and limitations.

Local history and privacy

The monitor stores summarized temperature samples in the current user's standard macOS Application Support directory. The path is resolved at runtime; no user-specific path is embedded in the source.

  • At most one record is saved per minute.
  • Records older than two hours are removed while the monitor runs and when it starts.
  • The TUI graphs only the most recent 60 minutes.
  • Nothing is transmitted over the network.
  • Raw serial numbers, hardware UUIDs, usernames, process lists, and file paths are never collected.

See Privacy for the complete data-handling description.

How it works

mac-temp is an executable Swift script. It discovers temperature services exposed through IOKit, reads temperature events, groups model-dependent sensor names into stable categories, stores minute-level summaries locally, and renders a responsive ANSI TUI. Fan and power-control interfaces are never opened.

See Architecture for implementation details.

Safety and limitations

  • This tool is for observation, not hardware diagnosis.
  • Internal sensor readings are not the same as external enclosure temperature.
  • Brief high SoC temperatures can be normal under sustained CPU or GPU workloads.
  • Keep the Mac on a stable, well-ventilated surface and follow Apple's operating guidance.
  • Private or semi-private macOS sensor interfaces may change in future releases.

Uninstall

If installed with the default prefix:

rm "$HOME/.local/bin/mac-temp"

Removing the executable does not remove existing local history. See Privacy for its location and deletion instructions.

Documentation

License

Licensed under the Apache License 2.0.

Apple, macOS, Mac, and Apple Silicon are trademarks of Apple Inc. This project is independent and is not affiliated with or endorsed by Apple.

About

Dependency-free macOS TUI temperature monitor for Apple Silicon with SoC, SSD/NAND, and battery readings, 60-minute trends, local history, and thermal alerts.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages