https://github.com/sdesalas/usbmon
Rerun a command when USB devices are connected & disconnected.
https://github.com/sdesalas/usbmon
Last synced: about 1 month ago
JSON representation
Rerun a command when USB devices are connected & disconnected.
- Host: GitHub
- URL: https://github.com/sdesalas/usbmon
- Owner: sdesalas
- License: mit
- Created: 2017-07-18T07:42:36.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-23T08:48:54.000Z (almost 8 years ago)
- Last Synced: 2025-03-24T12:21:55.033Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# usbmon
CLI monitoring of USB devices. Rerun a command when USB devices are connected & disconnected.
## Installation:
```sh
$ npm install usbmon -g
```## Usage:
Rerun a CLI process whenever USB devices change
```sh
$ usbmonUsage: usbmon
where is any cli command for your system
Examples:
usbmon ls
usbmon lsusb
usbmon curl -I http://my.domain.com/notify/usb/change?device=6b2e0a8
```Note that `usbmon` uses [`libudev`](https://www.freedesktop.org/software/systemd/man/libudev.html) behind the scenes.
In Linux/Ubuntu you might need to install it:
```
sudo apt-get install build-essential libudev-dev
```## Use Cases:
[Nodebots](http://nodebots.io/), for example to re-attach a controller after its plugged in.
```
usbmon node simplebot/examples/attach-controller.js
```Big Brother... Monitoring and notification of connected USB devices.
```
$ usbmon ./notify.lsusb.sh
```