9,920
stars
+0+1+-1
317
forks
94
watchers
111
prs
99
issues
1
releases
–
discussions
README
m-cli
⚠️ 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!
- Installation
- Uninstallation
- Usage
- Available Commands
- Contributing
- Resources
---
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
sh
brew install m-cli
Or if you want to have the latest version
sh
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
sh
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:
sh
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
sh
source ~/.local/opt/m-cli/completions/bash/m
To make it persistent, add the above line to your ~/.bashrc or ~/.bash_profile.
Zsh
sh
source ~/.local/opt/m-cli/completions/zsh/_m
To make it persistent, add the above line to your ~/.zshrc.
Fish
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
sh
brew uninstall m-cli
Manual Uninstall
sh
m --uninstall
---
Usage
- Run m to display all available commands.
- Run m --help to see usage options for any specific command.
Example:
sh
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 • music • network • nosleep • notificationcenter • ntp • permissions • powermode • printer
restart • remotelogin • safeboot • screensaver • service • shutdown • sleep • timezone • touchbar
trash • update • usb • user • volume • vpn • wallpaper • wifi
---
Notes
- Some macos commands needs to be executed with sudo internally, so it's recommended you have sudo privileges.
- The trash command 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 in System Preferences Security & Privacy Privacy Full Disk Access.
---
Contributing
We ❤️ contributions!