CLI

USB-C diagnostics from your terminal. Same engine as the menu bar app.

Install

Homebrew (recommended)

Homebrew installs the menu bar app and puts the whatcable CLI on your PATH automatically.

$ brew tap darrylmorley/whatcable
$ brew install --cask whatcable

Manual symlink

If you installed the .app from a GitHub release, the CLI is bundled inside it. Symlink it to make it available in your shell:

$ ln -s /Applications/WhatCable.app/Contents/Helpers/whatcable /usr/local/bin/whatcable

Usage

Basic scan

Run whatcable with no flags to get a plain-English summary of every USB-C port.

$ whatcable

USB-C Port 1
  ✓ Charging well at 96W
  Cable: 5A, 100W, USB4 40 Gbps
  Charger: 5V / 9V / 15V / 20V PDOs

USB-C Port 2
  ! Cable is limiting charging speed
  Cable: 3A, 60W, USB 2.0
  Device: External SSD, USB 10 Gbps

JSON output

Use --json to get structured JSON. Pipe it into jq for scripting and automation.

$ whatcable --json | jq '.ports[0].cable'

Watch mode

Use --watch to monitor ports in real time. The display updates as cables connect and disconnect. Press Ctrl+C to stop.

$ whatcable --watch

In watch mode, the terminal clears and redraws on each change with a timestamp header. Combine with --json for newline-delimited JSON (one object per change).

$ whatcable --watch --json

Raw IOKit properties

Use --raw to include the underlying IOKit properties alongside the summary. Useful for debugging or filing bug reports.

$ whatcable --raw

Cable report

Use --report to generate a markdown report for each e-marked cable. It includes the cable's vendor ID, product ID, capability flags, and a pre-filled GitHub issue URL.

$ whatcable --report

If no e-marked cable is connected, the command tells you so. Most cables under 60W don't have an e-marker chip.

All flags

$ whatcable --help

whatcable 0.8.6

Usage: whatcable [options]

Options:
  --watch        Continuously monitor for changes (Ctrl+C to exit)
  --json         Output as JSON instead of human-readable text
  --raw          Include raw IOKit properties for each port
  --report       Print a cable report (markdown + GitHub URL) and exit
  --version      Print version and exit
  -h, --help     Show this help and exit

Requirements

New to WhatCable? See the main docs for what the app shows and how to configure it.