Arcanist and moz-phab can be installed into any location on your system, as
long as the arc
and moz-phab
commands work from your command line.
These steps require both git and php, which happily are preinstalled on macOS.
In this guide we'll be installing arc and moz-phab into ~/.mozbuild
,
however they can be installed into any reasonable location.
- Create a
~/.mozbuild
directory if it doesn't already exist and clone the arcanist and phabricator library repositories:
mkdir -p ~/.mozbuild
cd ~/.mozbuild
git clone https://github.com/phacility/arcanist.git
git clone https://github.com/phacility/libphutil.git
- Create a
~/.mozbuild/moz-phab
directory and download the latest version ofmoz-phab
:
mkdir -p ~/.mozbuild/moz-phab
cd ~/.mozbuild/moz-phab
curl -O https://raw.githubusercontent.com/mozilla-conduit/review/$(basename $(curl -sLo /dev/null -w '%{url_effective}' https://github.com/mozilla-conduit/review/releases/latest))/moz-phab
chmod +x moz-phab
Both arc and moz-phab need to be on the PATH in order for the scripts to work.
- Update your
PATH
to include arcanist and moz-phab:
echo 'export PATH="$HOME/.mozbuild/arcanist/bin:$HOME/.mozbuild/moz-phab:$PATH"' >> ~/.bashrc
- Close and reopen your terminal program
- Ensure running arc and moz-phab both work:
arc -h
moz-phab -h