🦀 udever
Stop writing udev rules by hand.
udeveris a blazing fast, interactive CLI tool to manage udev rules for your USB devices. Generate permission rules, create symlinks, and reload drivers without leaving your terminal.
⚡ Features
- Interactive Selection: Fuzzy-search your connected USB devices. No more
lsusbgrep hunting. - Smart OS Detection: Automatically selects the correct group (
uucpfor Arch/Manjaro,dialoutfor Debian/Ubuntu). - Safe & Robust:
- Filters out Root Hubs to prevent system accidents.
- Performs
systemd-udevdhealth checks before running. - Validates syntax before writing.
- Instant Feedback: Automatically reloads rules and triggers device events (
udevadm trigger). - Editor Integration: Open generated rules in
nano,vim, ornvimfor manual tweaking. - Symlink Generator: Easily create persistent device names (e.g.,
/dev/my_arduino).
🚀 Installation
From Crates.io (Recommended)
You need Rust installed.
Since udever requires root privileges to manage udev rules, i recommend making it available to sudo:
# Ensure that cargo's path is valid
# in ~/.bashrc etc.
# You should link
Arch Linux (AUR)
You can install udever from the AUR using an AUR helper like yay or paru.
# or
From Source
)
📖 Usage
Note: Root privileges are required to write into /etc/udev/rules.d/.
Run the interactive wizard:
Quick Commands
Create a rule for a specific device ID (VID:PID):
Generate shell completions (bash/zsh/fish):
🎮 Workflow Demo
$ sudo udever
? Select USB Device (Type to search)
> 1. STMicroelectronics [0483:3748] ST-LINK/V2
2. FTDI [0403:6001] FT232R USB UART
3. Logitech [046d:c52b] USB Receiver
? Permission
> Current user only (uaccess)
Group 'uucp' (mode 0660)
Everyone (mode 0666)
? Create symlink? [Y/n] Y
? Symlink Name: stlink_v2
SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", TAG+="uaccess", SYMLINK+="stlink_v2"
-----------------------------------------------------
? Write to file? [Y/n] Y
File created.
Reloading udev rules...
Success: /dev/stlink_v2
🛠 Troubleshooting
"udev daemon is NOT active"
udever relies on systemd-udevd. If the tool warns you, try starting the service:
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork it
- Create your feature branch (
git checkout -b feature/cool-feature) - Commit your changes (
git commit -am 'Add some cool feature') - Push to the branch (
git push origin feature/cool-feature) - Create a new Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.