ο£Ώ m-cli
March 23, 2026 Β· View on GitHub
β οΈ Version 2 includes breaking changes due to a new standardized syntax and improved shell autocompletion. See the changelog for details.
π₯ The Swiss Army Knife for macOS β in your Terminal!
Overview
m-cli is a powerful command-line tool for macOS that enables you to control system functions, manage utilities, and tweak preferences β all from the Terminal.
Key Features:
- Manage system and admin tasks effortlessly
- No third-party dependencies
- Simple, non-intrusive installation
- Clean and safe β doesnβt modify your system unnecessarily
Support
Enjoying this tool? Consider supporting development β
Installation
Using Homebrew
brew install m-cli
Or if you want to have the latest version
brew install rgcr/formulae/m-cli
Note: When installed via Homebrew, shell autocompletion scripts are installed and configured automatically for Bash, Zsh, and Fish. No additional setup is needed.
Manual Installation
curl -fsSL https://raw.githubusercontent.com/rgcr/m-cli/main/install.sh | bash
Ensure that ${HOME}/.local/bin is in your $PATH. You can add it with:
export PATH="${HOME}/.local/bin:$PATH"
Add the line above to your shell config file (e.g. ~/.bashrc, ~/.zshrc) for persistence.
Shell Autocompletion (Manual Installation)
To enable shell autocompletion for m, source the appropriate file based on your shell:
Bash
source ~/.local/opt/m-cli/completions/bash/m
To make it persistent, add the above line to your ~/.bashrc or ~/.bash_profile.
Zsh
source ~/.local/opt/m-cli/completions/zsh/_m
To make it persistent, add the above line to your ~/.zshrc.
Fish
source ~/.local/opt/m-cli/completions/fish/m.fish
To make it persistent, add the line to ~/.config/fish/config.fish.
Uninstallation
Using Homebrew
brew uninstall m-cli
Manual Uninstall
m --uninstall
Usage
- Run
mto display all available commands. - Run
m <command> --helpto see usage options for any specific command.
Example:
m dock --help
- Enjoy!
Available Commands
airdrop β’ appearance β’ audio β’ battery β’ bluetooth β’ dir β’ disk β’ display β’ dns β’ dock
fan β’ finder β’ firewall β’ flightmode β’ gatekeeper β’ group β’ hostname β’ hosts β’ info
itunes β’ lock β’ network β’ nosleep β’ notificationcenter β’ ntp β’ powermode β’ printer
restart β’ remotelogin β’ safeboot β’ screensaver β’ service β’ shutdown β’ sleep β’ timezone β’ touchbar
trash β’ update β’ usb β’ user β’ volume β’ vpn β’ wallpaper β’ wifi
Notes
- Some
macoscommands needs to be executed withsudointernally, so it's recommended you havesudoprivileges. - The
trashcommand will not work unless your terminal (e.g.iTerm2,Terminal.app) has the necessary permissions to access the Trash folder. You can grant this permission inSystem Preferences > Security & Privacy > Privacy > Full Disk Access.
Contributing
We β€οΈ contributions!
- Fork the repo
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -m 'Add some feature' - Push the branch:
git push origin my-new-feature - Open a Pull Request π
Resources
π More Projects
If you found this useful, you might also enjoy:
-
iproute-mac β Native Go implementation of Linux
iproute2for macOS (ip,bridge&ss). -
t-mux-manager β Lightweight tmux session and project manager written in Bash.
-
StickyShot β Screenshot tool with floating sticky preview windows for macOS.
-
Snape β A Severus Snippet Manager for macOS.
Β© Rogelio Cedillo β Licensed under the MIT License