PHPackages                             tandrezone/nmcli-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. tandrezone/nmcli-php

ActiveLibrary[HTTP &amp; Networking](/categories/http)

tandrezone/nmcli-php
====================

A comprehensive PHP wrapper for NetworkManager's nmcli command-line tool

01PHP

Since Oct 2Pushed 7mo agoCompare

[ Source](https://github.com/tandrezone/nmcli)[ Packagist](https://packagist.org/packages/tandrezone/nmcli-php)[ RSS](/packages/tandrezone-nmcli-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

nmcli-php
=========

[](#nmcli-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b29ad88958ac5d08414b7abba882d68dfe78dd4a461165fc686d86ad22f793e2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74616e6472657a6f6e652f6e6d636c692d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tandrezone/nmcli-php)[![Total Downloads](https://camo.githubusercontent.com/d6b689e8cf9868867bb92969661ce20482b3b200470ffa76320c74ed7a8e7bfb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74616e6472657a6f6e652f6e6d636c692d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tandrezone/nmcli-php)[![License](https://camo.githubusercontent.com/6ac720cc3c5bf6ac763643181ac919dda49f9e0710a8b912569ff9f8511faa27/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f74616e6472657a6f6e652f6e6d636c692d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tandrezone/nmcli-php)

A comprehensive PHP wrapper for NetworkManager's `nmcli` command-line tool. This library provides an object-oriented interface to manage network connections, devices, and WiFi operations on Linux systems.

Features
--------

[](#features)

- **Object-Oriented Network Management**: Connections, devices, and WiFi networks as objects with built-in methods
- **Connection Management**: List, show, add, modify, clone, delete connections via `Connection` objects
- **Device Management**: List devices, connect/disconnect, show device details via `Device` objects
- **WiFi Operations**: List networks, connect to WiFi, create hotspots via `WifiNetwork` objects
- **Import/Export**: Import and export connection configurations
- **Structured Data**: Returns objects with structured properties instead of raw command output
- **Error Handling**: Custom exceptions for better error management
- **Flexible sudo usage**: Optional sudo support for different use cases
- **PSR-4 Autoloading**: Modern Composer package structure

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require tandrezone/nmcli-php
```

Requirements
------------

[](#requirements)

- PHP 7.4 or higher
- NetworkManager with `nmcli` command available
- Linux system with appropriate permissions for network operations
- Optional: `sudo` access for system-level network changes

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
