m-cli

macOS command-line tool, invoked as `m`, for controlling system functions such as Wi-Fi, Bluetooth, display, dock, disk, firewall and volume from the Terminal.

install

m-cli is a command-line tool for macOS, invoked as m, that groups system administration and preference tweaks under a single set of subcommands. Running m lists all available commands, and m <command> --help shows usage for a specific one, for example m dock --help.

The command set covers a wide range of system areas: networking and connectivity (wifi, bluetooth, dns, vpn, network, airdrop, firewall, remotelogin), display and audio (display, appearance, audio, volume, wallpaper, screensaver), power and hardware (battery, fan, powermode, sleep, nosleep, restart, shutdown, usb, touchbar), and system management (disk, finder, dock, gatekeeper, hosts, hostname, ntp, timezone, user, group, permissions, trash, update, and others). Some commands run sudo internally, so sudo privileges are recommended. The trash command requires the terminal app to have Full Disk Access.

The README states that it has no third-party dependencies and a non-intrusive installation. Homebrew installs set up shell autocompletion for Bash, Zsh and Fish automatically. Manual installs use an install script that places files under ~/.local/bin, with completion scripts that you source yourself. Version 2 introduced a standardized command syntax and revised autocompletion, with breaking changes from v1. The tool is aimed at macOS users and administrators who prefer to script or quickly toggle system settings from the terminal.

Installation

# via Homebrew
brew install m-cli
# via Homebrew (latest version)
brew install rgcr/formulae/m-cli
# via Manual script
curl -fsSL https://raw.githubusercontent.com/rgcr/m-cli/main/install.sh | bash

Alternatives & related tools

add a badge to your README

Maintain m-cli? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/m-cli.svg)](https://www.trmn.sh/tools/m-cli?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/m-cli?utm_source=badge"><img src="https://www.trmn.sh/badge/m-cli.svg" alt="Featured on trmn" height="20"></a>