Cli/guide/Installation

< Cli‎ | guide

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 the WSL shell.

Alternatively, you can find binaries for most operating systems and CPU architectures on the releases page.

Download edit

Download the binary (version 0.23.0 as of this writing) by running the following commands, which include a checksum check:

ARCH=amd64 VER=v0.23.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 edit

# install the binary to '/usr/local/bin/mw' with the correct permissions
sudo install mw /usr/local/bin/mw

Update edit

Check your installation for available updates by running:

sudo mw update

See Cli/guide/Update for more details.

Cleanup edit

After installing, delete the mw binary in your current working directory.

rm -v mw