Skip to content
99handmadePublic

About

A Node.js CLI enhancement for lsusb that displays USB devices in a readable tree format.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lsusb+

A Node.js CLI enhancement for lsusb that displays USB devices in a readable tree format.

Requirements

  • Linux with lsusb available
  • Node.js 20+
sudo apt install -y usbutils

Install

npm install
npm link

If sudo cannot find node (e.g. using nvm):

sudo env "PATH=$PATH" "$(which npm)" link

Usage

lsusb+          # show all devices
lup             # short alias
lsusb+ -d 10ab:9309   # filter by vendor:product ID
lup -d 10ab:9309      # same with alias

Permission Note

If you see Couldn't open device, some information will be missing:

sudo env "PATH=$PATH" lsusb+

Output

For each device, the command prints:

  1. Bus/Device, VID:PID, product name
  2. USB sysfs path (/sys/bus/usb/devices/<path>)
  3. USB version and link speed
  4. 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

License

MIT

Changelog

v0.3.0

  • Added -d vendor:product filter (e.g. lsusb+ -d 10ab:9309)
  • Added lup as a short command alias
  • Changed license to MIT

v0.2.0

  • Added colored output with TTY detection
  • Added USB sysfs path and link speed display
  • Added endpoint attributes (attr, sync, usage)

v0.1.0

  • Initial release
  • Tree view of USB device descriptors from lsusb -v

About

A Node.js CLI enhancement for lsusb that displays USB devices in a readable tree format.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages