m is the CLI for macOS


Not all tasks are easy to perform with a GUI, the CLI opens up a new realm of possibilities with scripting, automation, and simplified work flows.

m is a 3rd party tool for interacting with macOS via the CLI.

Install m:

brew install m-cli

Example command with m:

jemurray@mbp-2019:~ $ sudo m firewall status
Firewall is enabled. (State = 1)

The full command set:

jemurray@mbp-2019:~ $ m

  Swiss Army Knife for macOS ! 


usage:  m [OPTIONS] COMMAND [help]

    OPTIONS
        --update        update m-cli to the latest version
        --uninstall     uninstall m-cli

    COMMANDS:
        help
        battery
        bluetooth
        dir
        disk
        display
        dns
        dock
        finder
        firewall
        flightmode
        gatekeeper
        group
        hostname
        info
        itunes
        lock
        network
        nosleep
        notification
        ntp
        printer
        restart
        safeboot
        screensaver
        service
        shutdown
        sleep
        timezone
        trash
        update
        user
        volume
        vpn
        wallpaper
        wifi

As an example, I was able to use m to automate desktop builds using Ansible. Having the right tool for the job is invaluable.