A Node.js CLI enhancement for lsusb that displays USB devices in a readable tree format.
- Linux with
lsusbavailable - Node.js 20+
sudo apt install -y usbutilsnpm install
npm linkIf sudo cannot find node (e.g. using nvm):
sudo env "PATH=$PATH" "$(which npm)" linklsusb+ # show all devices
lup # short alias
lsusb+ -d 10ab:9309 # filter by vendor:product ID
lup -d 10ab:9309 # same with aliasIf you see Couldn't open device, some information will be missing:
sudo env "PATH=$PATH" lsusb+For each device, the command prints:
Bus/Device,VID:PID, product name- USB sysfs path (
/sys/bus/usb/devices/<path>) - USB version and link speed
- Configuration / Interface / Endpoint tree with attributes
Example:
#1 Bus 003 Device 004: 10ab:9309 USI Co., Ltd
USB path: /sys/bus/usb/devices/3-3.2
USB version: 1.10 Link speed: 12 Mb/s
└─ Config 1 [Self Powered, Remote Wakeup, 100mA]
├─ IF 0 Wireless
│ ├─ EP 0x81 IN Interrupt 16B interval=1
│ ├─ EP 0x82 IN Bulk 64B interval=0
│ └─ EP 0x02 OUT Bulk 64B interval=0
└─ IF 1 Wireless
├─ EP 0x83 IN Isochronous 9B interval=1
└─ EP 0x03 OUT Isochronous 9B interval=1
MIT
- Added
-d vendor:productfilter (e.g.lsusb+ -d 10ab:9309) - Added
lupas a short command alias - Changed license to MIT
- Added colored output with TTY detection
- Added USB sysfs path and link speed display
- Added endpoint attributes (
attr,sync,usage)
- Initial release
- Tree view of USB device descriptors from
lsusb -v