You will need to be familiar with Repo and Git.
If you're on Linux, you can use the default repo
script provided by the Android Open Source Project. On Windows, git-repo can be used (untested though).
To initialize your local repository with Mirai's trees, use something like this :
repo init -u https://github.com/vnma0/mirai-repo
Then to sync up everything :
repo sync