ushiboy/nmcli ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Python library that wraps the NetworkManager nmcli command line tool in a clean, easy to use way.
I want to be able to do things like list connections, check device status, see Wi Fi networks, connect to a Wi Fi network, bring connections up or down, add or modify connection settings, and delete connections. It should feel like a simple Python API, not like I am typing shell commands myself.
Please make it work nicely on Linux where NetworkManager is installed, and handle sudo when needed, but also let me disable sudo if I am already running as root. Keep the API readable and practical, with helpful errors when nmcli fails.
If anything is unclear, look up the current nmcli behavior online first and then implement the wrapper in a way that matches it closely.
Are you gonna build this?
make sure you review the code using coderabbit