⚠️ 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!
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.
- Manage system and admin tasks effortlessly
- No third-party dependencies
- Simple, non-intrusive installation
- Clean and safe – doesn’t modify your system unnecessarily
Enjoying this tool? Consider supporting development ☕
Using Homebrew
brew install m-clibrew install rgcr/formulae/m-cliNote: When installed via Homebrew, shell autocompletion scripts are installed and configured automatically for Bash, Zsh, and Fish. No additional setup is needed.
curl -fsSL https://raw.githubusercontent.com/rgcr/m-cli/main/install.sh | bashEnsure 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.
To enable shell autocompletion for m, source the appropriate file based on your shell:
source ~/.local/opt/m-cli/completions/bash/mTo make it persistent, add the above line to your ~/.bashrc or ~/.bash_profile.
source ~/.local/opt/m-cli/completions/zsh/_mTo make it persistent, add the above line to your ~/.zshrc.
source ~/.local/opt/m-cli/completions/fish/m.fishTo make it persistent, add the line to ~/.config/fish/config.fish.
brew uninstall m-clim --uninstall- Run
mto display all available commands. - Run
m <command> --helpto see usage options for any specific command.
Example:
m dock --help- Enjoy!
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 • safeboot • screensaver • service • shutdown • sleep • timezone • touchbar
trash • update • usb • user • volume • vpn • wallpaper • wifi
- 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.
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 🚀
- Add more plugins
© Rogelio Cedillo – Licensed under the MIT License