Cli/guide/Installation
Install mwcli
for Linux, Windows, or macOS using the instructions below.
If you are running Windows, please install mwcli
in WSL as it has significantly better performance than Windows.[1] The following commands will only work in a linux shell.
Alternatively, you can find binaries for most operating systems and CPU architectures on the releases page.
Once installed, some sub commands may have other dependencies. But you should always be prompted to installed the needed packages at the time of executing your commands.
Download
Download the binary (version v0.25.0 as of this writing) by running the following commands, which include a checksum check:
ARCH=amd64 VER=v0.25.0 MW_PLATFORM=$(uname | tr '[:upper:]' '[:lower:]') bash -c 'curl -s "https://gitlab.wikimedia.org/api/v4/projects/16/packages/generic/mwcli/${VER}/mw_${VER}_${MW_PLATFORM}_${ARCH}" -o mw && curl -s "https://gitlab.wikimedia.org/api/v4/projects/16/packages/generic/mwcli/${VER}/mw_${VER}_${MW_PLATFORM}_${ARCH}.sha256" -o mw.sha256 && echo $(cat mw.sha256 | tr -d '\n') " mw" > mw.sha256 && shasum -a 256 -c mw.sha256 && rm -v mw.sha256'
If successful, you'll see the following output:
mw: OK removed 'mw.sha256'
Install
# install the binary to '/usr/local/bin/mw' with the correct permissions
sudo install mw /usr/local/bin/mw
Update
Check your installation for available updates by running:
sudo mw update
See Cli/guide/Update for more details.
Cleanup
After installing, delete the mw
binary in your current working directory.
rm -v mw