Lurker News
USB-C cables can be a mess. One cable charges at 5W, another does 100W and Thunderbolt 4, and they look identical in the drawer.

WhatCable sits in your menu bar and reads the cable data your Mac already has access to. Plug in a cable and it tells you in plain English what it can actually do: charging wattage, data speed, display support, Thunderbolt, etc.
Built in Swift/SwiftUI. Open source, free, no tracking.
GitHub: https://github.com/darrylmorley/whatcable

Comments (168) 42 threads

Earlier comments
theanonymousone2 replies#
I would like to ask an LLM to rewrite it as Python CLI script. Is it even possible, or some Swift-only functionality is necessary?

P.S. Some time ago I learnt through HN of a one-line command in macOS which revealed the power (Wattage) of the connected charger. Can't find it now, but it was very useful.

krelas1 reply#
`system_profiler SPPowerDataType | grep "Wattage"`?
theanonymousone#
Yes, something like this. Thanks!
nhecker#
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)

dhosek#
This is something that I’ve wanted for quite a while. I have lots of mystery USB-C cables that it would be nice to be able to label with their capabilities. Now I can.
thenakulchawla#
This is a great app. I have a device for it that I bought maybe a year ago, but having it right on my laptop makes things a lot easier.

Great work!!!

patrickhener#
This is really cool stuff. It is a pain to categorize cables and this really helps. Thanks for showing.

Load more comments