nmcli
A python wrapper library for the network-manager cli client
Decision gist · record as of 2026-08-14
Yes, if you need programmatic control of NetworkManager on Linux and can meet the sudo/root requirement. The package has low install friction, no external Python dependencies, active maintenance, and no known vulnerabilities. MIT licensing poses no restriction. Install only if your use case requires direct network management automation; it is not a general networking library.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires NetworkManager installed (e.g., `sudo apt install network-manager` on Debian) and a user account with sudo access to execute nmcli commands, or root privileges if `disable_use_sudo` is set.
- Low install friction with no runtime dependencies beyond NetworkManager itself.
- Active maintenance with recent commits and steady development.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.
last release 2026-06-13 (62 days) · last repo commit 2026-06-13 · 104 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 74,346 downloads/mo, #14,848 on PyPI
Alternatives
Verify before relying
import nmcli
# List connections and devices
connections = nmcli.connection()
devices = nmcli.device()
# Connect to Wi-Fi
nmcli.device.wifi_connect('SSID', 'password')
# Modify connection settings
nmcli.connection.modify('SSID', {'ipv4.method': 'manual'})- Whether the package works on non-Linux systems or only POSIX Linux as classifiers suggest
- Current test coverage and stability guarantees for production network management tasks
- Performance characteristics when managing many connections or frequent state changes
What it is and what it does
nmcli wraps the NetworkManager command-line interface to let Python code query and control network connections, devices, and Wi-Fi operations directly. It exposes methods to list connections and devices, connect or disconnect from networks, modify connection profiles (IP addresses, gateways, DNS), and scan or join Wi-Fi networks. The library parses nmcli output into structured Python objects, removing the need to parse shell command results manually.
The package is designed for Linux systems running NetworkManager and requires either sudo access with NOPASSWD configuration or root privileges. It supports a broad subset of nmcli functionality—connection lifecycle (up, down, delete, reload), device management (connect, disconnect, status), and Wi-Fi operations (scan, connect, hotspot)—though some advanced features like agent configuration and connection editing are not yet wrapped.
Use it for
- Automate Wi-Fi connection and disconnection in headless Linux applications or IoT devices
- Programmatically configure static IP addresses and network settings without manual nmcli calls
- Monitor device and connection status in network management or system administration tools
- Build network provisioning scripts that query available Wi-Fi networks and connect to them
- Manage multiple network profiles and switch between them in containerized or embedded environments
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need programmatic control of NetworkManager on Linux and can meet the sudo/root requirement.
The package has low install friction, no external Python dependencies, active maintenance, and no known vulnerabilities. MIT licensing poses no restriction. Install only if your use case requires direct network management automation; it is not a general networking library.
Install
nmcli on PyPI
Before you install
Low install friction with no runtime dependencies beyond NetworkManager itself. Active maintenance with recent commits and steady development.
Requires NetworkManager installed (e.g., `sudo apt install network-manager` on Debian) and a user account with sudo access to execute nmcli commands, or root privileges if `disable_use_sudo` is set.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.
Quickstart
import nmcli
# List connections and devices
connections = nmcli.connection()
devices = nmcli.device()
# Connect to Wi-Fi
nmcli.device.wifi_connect('SSID', 'password')
# Modify connection settings
nmcli.connection.modify('SSID', {'ipv4.method': 'manual'})
Verify before relying
- Whether the package works on non-Linux systems or only POSIX Linux as classifiers suggest
- Current test coverage and stability guarantees for production network management tasks
- Performance characteristics when managing many connections or frequent state changes
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 62 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 74,346 / month, #14,848 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Operating System :: POSIX :: LinuxProgramming Language :: Python :: 3 |
Evidence: nmcli-1.8.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “linux network configuration api”
- nmclinmcli is a Python wrapper for the NetworkManager command-line client,…
- netifaces2Retrieves network interface information (addresses, gateways,…
- pyroute2Pyroute2 is a pure Python networking framework that provides direct…
Give your agent the search over MCP, or paste the wish link into any chat.
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
psutil retrieves real-time information about running processes and system resources (CPU, memory, disks, network, sensors) across multiple operating systems, enabling system monitoring, process profiling, and resource management.
pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.
uvloop is a drop-in replacement for Python's built-in asyncio event loop, implemented in Cython and using libuv, that accelerates async I/O operations.
execnet lets you spawn and communicate with Python interpreters across local processes, remote hosts, and different platforms, using a simple API for task distribution and inter-process messaging.
However, the aging maintenance status (275 days since last release) means you should verify it meets your concurrency and performance needs before committing to a…
PyZMQ provides Python bindings for ZeroMQ (ØMQ), a lightweight messaging library that enables fast, asynchronous communication between distributed processes and applications.
See also librouteros · python-miio · wiim · PyRIC · flux-led · pywemo · aioruckus · aioqsw · tplink-omada-client · python-kasa