# 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.

Stars: 9.9k · Language: Shell · License: MIT · Categories: System

- Repository: https://github.com/rgcr/m-cli
- Page: https://www.trmn.sh/tools/m-cli

## Install

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

## Overview

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

```bash
# via Homebrew
brew install m-cli
```

```bash
# via Homebrew (latest version)
brew install rgcr/formulae/m-cli
```

```bash
# via Manual script
curl -fsSL https://raw.githubusercontent.com/rgcr/m-cli/main/install.sh | bash
```

## Alternatives

- [Mole](https://www.trmn.sh/tools/mole.md): macOS CLI (`mo`) that cleans caches, uninstalls apps with leftovers, explores disk usage, runs maintenance tasks, and shows live system stats. (Shell, 73.2k stars)
- [lnav](https://www.trmn.sh/tools/lnav.md): Terminal log file viewer that merges, formats, and indexes log files with SQL analysis and real-time monitoring (C++, 10.8k stars)
- [bpytop](https://www.trmn.sh/tools/bpytop.md): Terminal-based system resource monitor showing CPU, memory, disk, network and process usage with interactive interface (Python, 10.9k stars)
- [nvtop](https://www.trmn.sh/tools/nvtop.md): htop-like GPU and accelerator task monitor supporting NVIDIA, AMD, Intel, Apple, and other vendors (C, 11.1k stars)
- [htop](https://www.trmn.sh/tools/htop.md): Cross-platform interactive process viewer with real-time system monitoring and process management (C, 8.4k stars)

---

Canonical: https://www.trmn.sh/tools/m-cli
