Installation
Installing m-cli
is straightforward. You can use Homebrew for the simplest setup or install it manually for more control.
Using Homebrew (Recommended)
For the easiest installation and automatic setup of shell completions, we recommend using Homebrew.
brew install m-cli
To get the absolute latest version directly from the source repository, you can use:
brew install rgcr/formulae/m-cli
When installed via Homebrew, shell autocompletion scripts for Bash, Zsh, and Fish are configured automatically. No further steps are needed.
Manual Installation
If you prefer not to use Homebrew, you can install m-cli
with a simple curl
command.
curl -fsSL https://raw.githubusercontent.com/rgcr/m-cli/main/install.sh | bash
This script performs the following actions:
- Clones the
m-cli
repository into~/.local/opt/m-cli
. - Creates a symbolic link from
~/.local/opt/m-cli/m
to~/.local/bin/m
.
PATH Configuration
For the m
command to be accessible from anywhere in your terminal, you must ensure that ~/.local/bin
is in your shell's PATH
variable.
You can do this by adding the following line to your shell's configuration file (e.g., ~/.bashrc
, ~/.zshrc
, or ~/.config/fish/config.fish
):
export PATH="${HOME}/.local/bin:$PATH"
After adding the line, restart your terminal or source the configuration file (e.g., source ~/.zshrc
).
Shell Autocompletion (Manual Install)
If you installed m-cli
manually, you'll need to source the appropriate completion script for your shell to enable tab autocompletion.
Bash
Add the following line to your ~/.bashrc
or ~/.bash_profile
:
source ~/.local/opt/m-cli/completions/bash/m
Zsh
Add the following line to your ~/.zshrc
:
source ~/.local/opt/m-cli/completions/zsh/_m
Fish
Add the following line to your ~/.config/fish/config.fish
:
source ~/.local/opt/m-cli/completions/fish/m.fish
Uninstallation
Using Homebrew
If you installed with Homebrew, you can uninstall with:
brew uninstall m-cli
Manual Uninstall
If you installed manually, m-cli
provides a convenient self-destruct command:
m --uninstall