logoalt Hacker News

nheckertoday at 3:20 PM0 repliesview on HN

Python script that Claude Code wrote and I tweaked for peeking at marked USB-C cables: https://github.com/nhecker/usb-e-marker

Gist of random (human-written) power-related commands to peek at random power info: https://gist.github.com/nhecker/8e850773ff229724ce361967cc22...

For your last point, you're probably looking for something like `ioreg -raw0 -c AppleSmartBattery | plutil -extract 0.PowerTelemetryData.SystemPowerIn raw -` (The source for that last command is from the above gist: https://gist.github.com/nhecker/8e850773ff229724ce361967cc22... ) Or maybe `pmset -g ac | head -n3` is helpful, too. HTH.

_nick

(edit1: formatting)

(edit2: there's also https://news.ycombinator.com/item?id=47677607 which seems pretty cool but is quite complex, and might be overkill)

(edit3: different method for printing adapter wattage)