r/macosprogramming • • 9h ago

USBview-HS: Native USB inspector for macOS(Swift, haskell). Explore the USB device tree, inspect descriptors, and reconnect devices or hubs from the menu bar.

Post image

I built a small open-source USB inspector for macOS 15+ (USBview HS) because my keyboard kept freezing after sleep and I got tired of crawling under the desk to replug it.

It pairs a native SwiftUI app (plus menu bar popover & floating mini window) with a Haskell CLI engine that reads the macOS I/O Registry directly.

What it does:

  • Live USB topology tree — controllers, ports (USB 2/3 companion lanes merged), physical USB 3 hub pairing, nested hubs, and devices with auto-refresh and a connection log.

  • One-click USB device reconnect — resets a stuck peripheral via IOUSBHostDevice.reset() from the main window or menu bar (blocks hubs/exclusively-owned devices and warns about mounted BSD disks before resetting).

  • Deep device inspection — VID:PID, negotiated speed, serial number, USB-C transports, per-port current limits & error counters, Ethernet/storage details, and on-demand configuration descriptors (with actual Interrupt/Isochronous polling rate in µs/ms & Hz, high-bandwidth packets, and bMaxPower in mA).

  • CLI & JSON export — --dump-tree, --dump-json, --details, --descriptors, --storage, --network, and --watch.

  • Languages: English (default), 简体中文, Русский, and فارسی (with RTL layout).

Free, MIT-licensed, Apple Silicon builds available in Releases (ad-hoc signed, so first launch needs xattr -dr com.apple.quarantine).

GitHub: USBview-HS

Feedback and edge-case reports are very welcome!

5 Upvotes

Duplicates