CMDR is a simple command version management tool that helps you quickly switch from multiple command versions.
Run one for the following command to install the latest version of CMDR:
curl -o- https://raw.githubusercontent.com/MrLYC/cmdr/master/install.sh | ${SHELL:-bash}For Chinese users, you can install the CMDR via a proxy:
curl -o- https://raw.githubusercontent.com/MrLYC/cmdr/master/install.sh | bash -s -p- Download the latest release from GitHub;
- Make sure the download asset is executable;
- Run the following command to install the binary:
/path/to/cmdr init
- Restart your shell and run the following command to verify the installation:
cmdr version
To install a new command, run the following command:
cmdr command install -n <command-name> -v <version> -l <path-or-url>Then you can list the installed commands by running the following command:
cmdr command list -n <command-name>Use a specified command version:
cmdr command use -n <command-name> -v <version>To upgrade the CMDR, just run:
cmdr upgradeSpeed up the download process by replacing the url to github proxy:
cmdr config set -k download.replace -v '{"match": "^https://raw.githubusercontent.com/.*$", "template": "https://ghproxy.com/{{ .input | urlquery }}"}'
cmdr command install -n install.sh -v 0.0.0 -l https://raw.githubusercontent.com/MrLYC/cmdr/master/install.sh