udever

Crates.ioudever
lib.rsudever
version0.2.3
created_at2026-01-25 06:57:16.934064+00
updated_at2026-01-25 07:09:49.809644+00
descriptionInteractive udev rule generator for Linux. Stop writing rules by hand.
homepagehttps://github.com/lazytatzv/udever
repositoryhttps://github.com/lazytatzv/udever
max_upload_size
id2068277
size34,093
Tatsuki Yano (lazytatzv)

documentation

https://docs.rs/udever

README

🦀 udever

Crates.io License

Stop writing udev rules by hand.

udever is 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 lsusb grep hunting.
  • Smart OS Detection: Automatically selects the correct group (uucp for Arch/Manjaro, dialout for Debian/Ubuntu).
  • Safe & Robust:
    • Filters out Root Hubs to prevent system accidents.
    • Performs systemd-udevd health 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, or nvim for manual tweaking.
  • Symlink Generator: Easily create persistent device names (e.g., /dev/my_arduino).

🚀 Installation

From Crates.io (Recommended)

You need Rust installed.

cargo install udever

Arch Linux (AUR)

You can install udever from the AUR using an AUR helper like yay or paru.

yay -S udever
# or
paru -S udever

From Source

git clone [https://github.com/lazytatzv/udever.git](https://github.com/lazytatzv/udever.git)
cd udever
cargo install --path .

📖 Usage

Note: Root privileges are required to write into /etc/udev/rules.d/.

Run the interactive wizard:

sudo udever

Quick Commands

Create a rule for a specific device ID (VID:PID):

sudo udever --id 1234:5678

Generate shell completions (bash/zsh/fish):

udever --completion zsh > _udever

🎮 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

--- Preview: /etc/udev/rules.d/99-stlink_v2.rules ---
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:

sudo systemctl start systemd-udevd

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork it
  2. Create your feature branch (git checkout -b feature/cool-feature)
  3. Commit your changes (git commit -am 'Add some cool feature')
  4. Push to the branch (git push origin feature/cool-feature)
  5. Create a new Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Commit count: 38

cargo fmt