Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

rgcr/m-cli

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

456 Commits
456 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

 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!


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

Buy Me A Coffee


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 m to display all available commands.
  • Run m <command> --help to see usage options for any specific command.

Example:

m dock --help
  • Enjoy!

Available Commands

airdropappearanceaudiobatterybluetoothdirdiskdisplaydnsdock fanfinderfirewallflightmodegatekeepergrouphostnamehostsinfo ituneslockmusicnetworknosleepnotificationcenterntppermissionspowermodeprinter restartremoteloginsafebootscreensaverserviceshutdownsleeptimezonetouchbar trashupdateusbuservolumevpnwallpaperwifi


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!

  1. Fork the repo
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push the branch: git push origin my-new-feature
  5. Open a Pull Request 🚀

Resources


🔗 More Projects

If you found this useful, you might also enjoy:

  • iproute-mac — Native Go implementation of Linux iproute2 for 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

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.