It's more complicated than "this cable is good/bad". I had a suspicion about one of my cables for months, but just last week I confirmed it with a device that shows the volts/amps/watts/total kwh passing through it: I have a USB-C cable with orientation. Plugged in one way it transfers about 5x more power than the other way, and in the lower orientation it's low enough for the earbud case I use it with to not charge.
No, I don't get it. Firstly, the normal system command output is not hard to read, but secondly, this output doesn't list any of the capabilities of the cables, just the devices at the ends of them. Perhaps showing an example of the output when the device is plugged in through the wrong cable would have helped. Does the tool produce a similar warning to the system popup, that is "this cable and device are mismatched"?
Fun fact: this information is already available in the System Information app on your Mac.
Hardware -> USB
I also use the app to check what wattage my cables are when charging my MacBook (Hardware -> Power)
I supported this kickstarter and got the device. It works well. I think they might still be producing them commercially, if I remember correctly.
Great for identifying not just bad cables, but also data rates.
https://www.kickstarter.com/projects/electr/ble-caberqu-a-di...
I was looking for a USB cable tester (where I would plug in both ends of my cable and it would test it (power, data, ...).
There are plenty for Ethernet, but none such ones for USB. Was I looking with the wrong keywords or such device does not exist?
Note: I have a dongle that measures the power when inserted between the laptop and the charger, this is not what I am looking for
> The script parses macOS’s system_profiler SPUSBHostDataType2 command, which produces a dense, hard-to-scan raw output
I couldn’t find source (the link in the article points to a GitHub repo of a user’s home directory. I hope for them it doesn’t contain secrets), but on my system, system_profiler -json produces json output. From that text, it doesn’t seem they used that.
lsusb will get you this info in Linux, but I like the idea of a little wrapper tool to make the output easier to parse.
480 vs. 5000 Mbps is a pernicious problem. It's very easy to plug in a USB drive and it looks like it works fine and is reasonable fast. Right until you try to copy a large file to it and are wondering why it is only copying 50MBytes/second.
It doesn't help that the world is awash in crappy charging A-to-C cables. I finally just throw me all away.
Is there a reason we can't plug a usb c cable with BOTH ends into the same computer and then get a full diagnostic on just the cable itself?
Why does it mention USB 3.2 (i.e. 20 Gbps) at all if it's for Macs? I thought Macs only support 10 Gbps and 40 Gbps, but nothing inbetween?
(which is inconvenient because USB 3.2 Gen 2x2 20 Gbps external SSD cases are much cheaper than USB 4 cases for now).
Also, he is calling a binary a script, which i find suspicious. This task looks like it should have been a script.
Content wise a nice idea, but I also like the conclusion about how AI made this possible in the first place. The author itself mentions this motivation. AI is undoubtedly perfect for utilities, small (even company internal) tools for personal use where maintainability is secondary as you can ditch the tool or rebuild it quickly.
> Two years ago, I wouldn’t have bothered with the rewrite, let alone creating the script in the first place. The friction was too high. Now, small utility scripts like this are almost free to build.
> That’s the real story. Not the script, but how AI changes the calculus of what’s worth our time.
This is a vibe coding Trojan horse article.
> That’s the real story. Not the script, but how AI changes the calculus of what’s worth our time.
Looking at the github source code, I can instantly tell. It's also full of gotchas.
They make a hardware device for this, it has several usb plugs on it, and two rows of LEDs that light up if the wires are all connected.
Two years ago, I wouldn’t have bothered with the rewrite, let alone creating the script in the first place. The friction was too high. Now, small utility scripts like this are almost free to build.
This aligns with the hypothesis that we should see and lots lots of "personalized" or single purpose software if vibe coding works. This particular project is one example. Are there a ton more out there?
Cross compiling is not unique to golang. It does make it pretty easy though.
> Two years ago, I wouldn’t have bothered with the rewrite, let alone creating the script in the first place. The friction was too high. Now, small utility scripts like this are almost free to build.
adding to the theory that soon we gonna prefer to write, rather download ready-made code, because the friction is super low
Interesting. Is there a way to adapt this for Linux or Windows? Many users, not just Mac users, face issues with USB-C cables. Practical cross-platform tools could be very helpful.
> I was punching through my email actively as Claude was chugging on the side.
I wonder how much writing these scripts cost. Were they done in Claude's free tier, pro, or higher? How much of their allotted usage did it require?
I wish more people would include the resources needed for these tasks. It would really help evaluate where the industry is in terms of accessibility. How much is it reserved for those with sufficient money and how that scales.
Side question : what font are you using in your screenshots? I find it really nice looking
> Go also has the unique ability to compile a cross-platform binary, which I can run on any machine.
Huh? Is this true? I know Go makes cross-compiling trivial - I've tried it in the past, it's totally painless - but is it also able to make a "cross platform binary" (singular)?
How would that work? Some kind of magic bytes combined with a wrapper file with binaries for multiple architectures?
i don't understand why do competent people need to mention that they vibe coded something.
"yes, vibe coded. Shamelessly, I might add"
I wouldn't trust this as source code until after a careful audit. No way I'm going to trust a vibe-coded executable.
Imagine if we printed the capabilities on the cables, like we used to.
Vibe coded, no thanks.
Vibe coding. Producing code without considering how we should approach the problem. Without thinking where exactly is the problem. This is like Electron, all over again.
Of course I don't have any problems with the author writing the tool, because everyone should write what the heck they want and how they want it. But seeing it gets popular tells me that people have no idea what's going on.
Please update the title to mention that this is MacOS only; I got excited to try this out, but I only have laptops running Linux and Windows.
A similar tool, open source and portable Linux/Mac/Windows is Cyme. It works wonderfully well.
I feel like we kind of got monkey’s paw’ed on USB-C. I remember during the 2000’s-2010’s people were drowning in a sea of disparate and incompatible connectors for video, audio, data, power, etc. and we’re longing for “One Port To Rule Them All” that could do everything in one cable. We kind of got that with USB-C, except now, you see a USB-C cable/port and you have no idea if it supports data only, data + charging, what speeds of data/charging, does it support video? maybe it does, maybe it doesn’t. at least it can plug in both ways… most of the time
[dead]
Guys, please, don't upvote this. If this topic will beat the "Physics Nobel Prize 2025", I will lose my faith in HN.
I feel like I need to point out that this tool does not do, in any way, what the title claims. Parsing the output of the system profiler tool will not tell you whether your cable is "good", which in practice tends to mean that it supports the protocol the user cares about at that moment. For some examples: If you connect a Thunderbolt only cable to a USB4 only device, this approach will give you no information about why things are not working. If you connect a USB2 only cable to a Display-Port Alternate Modal display, this approach will not tell you anything about why your display is not turning on.