List USB serial devices with their associated USB metadata
Project description
lsusd — List USB Serial Devices
A zero-dependency command-line tool that maps USB serial device nodes to their USB metadata (vendor, product, serial number, VID:PID).
Example Output
❯ lsusd
┌────────────────────────────────┬────────────────────────────┬──────────────────┬───────────────────┬───────────┐
│ Device Node │ USB Product │ USB Vendor │ USB Serial │ VID:PID │
├────────────────────────────────┼────────────────────────────┼──────────────────┼───────────────────┼───────────┤
│ /dev/cu.usbmodem2121101 │ USB JTAG/serial debug unit │ Espressif │ D8:3B:DA:70:69:7C │ 303A:1001 │
├────────────────────────────────┼────────────────────────────┼──────────────────┼───────────────────┼───────────┤
│ /dev/cu.usbmodemF078E4E385A03 │ Flexbar │ ENIAC │ F078E4E385A0 │ 303A:82BF │
├────────────────────────────────┼────────────────────────────┼──────────────────┼───────────────────┼───────────┤
│ /dev/cu.usbserial-113010893810 │ OBDLink SX │ ScanTool.net LLC │ 113010893810 │ 0403:6015 │
├────────────────────────────────┼────────────────────────────┼──────────────────┼───────────────────┼───────────┤
│ /dev/cu.usbserial-ST8XVRNW │ ElmScan 5 Compact │ ScanTool.net LLC │ ST8XVRNW │ 0403:6001 │
└────────────────────────────────┴────────────────────────────┴──────────────────┴───────────────────┴───────────┘
Installation
pip / pipx
pip install lsusd
# or
pipx install lsusd
Homebrew
brew tap mickeyl/formulae
brew install lsusd
From source
pip install -e .
Usage
lsusd
# or
python -m lsusd
Options
| Flag | Description |
|---|---|
-p, --plain |
Tab-separated output, no headers — suitable for cut, awk, etc. |
-c, --csv |
CSV output with header row |
-j, --json |
JSON array output, or JSON Lines in watch mode |
-n, --no-spinner |
Disable the progress spinner |
-w, --watch |
Watch USB serial devices in a live table |
--version |
Print version and exit |
Watch Mode
lsusd --watch
lsusd --watch --plain
lsusd --watch --json
--watch shows a live terminal table of connected USB serial devices and
redraws it after add/remove events. The machine-readable formats still emit
event streams: --plain and --csv use the columns action, device,
product, vendor, serial, and vidpid; --json emits newline-delimited
JSON objects. Initial devices use action present.
❯ lsusd --watch
lsusd watch 4 USB serial device(s) 2026-05-01T14:22:09
Press Ctrl-C to stop.
┌───────────────────────────────┬────────────────────────────┬────────────┬───────────────────┬───────────┐
│ Device Node │ USB Product │ USB Vendor │ USB Serial │ VID:PID │
├───────────────────────────────┼────────────────────────────┼────────────┼───────────────────┼───────────┤
│ /dev/cu.usbmodem2121101 │ USB JTAG/serial debug unit │ Espressif │ D8:3B:DA:70:69:7C │ 303A:1001 │
└───────────────────────────────┴────────────────────────────┴────────────┴───────────────────┴───────────┘
The watch implementation is push-driven, not a polling loop. On macOS, lsusd
subscribes to IOKit IOSerialBSDClient first-match and termination
notifications. On Linux, lsusd listens to kernel uevents through the netlink
socket. After an event arrives, lsusd takes a fresh snapshot only to compute the
added or removed device rows.
Supported Platforms
- macOS — discovers devices via
ioreg(/dev/cu.usbmodem*,/dev/cu.usbserial*) - Linux — discovers devices via sysfs (any tty with a USB ancestor, including devices renamed via udev)
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lsusd-1.1.0.tar.gz.
File metadata
- Download URL: lsusd-1.1.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82c3670a7562ffdc4369c18e4331b53e77e1a4cb14e7d327452ff79e381d0e5d
|
|
| MD5 |
cb20d7d76cad8b6bad5d26f3b94674ab
|
|
| BLAKE2b-256 |
bb7746a721076f126c33579fe3372daa8801642f39e955697402386a76727030
|
File details
Details for the file lsusd-1.1.0-py3-none-any.whl.
File metadata
- Download URL: lsusd-1.1.0-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae1e659f426386e019188c49492da6896012d0b2a83d22a12165f725ffccd768
|
|
| MD5 |
a70833249e51fc88c753810e04db844e
|
|
| BLAKE2b-256 |
23f6f70fd16a5f935b101803c31b8cbe0cfaa9640286e3bc9f26e7b6e858f16a
|