Matrix Cli installation issue

I got the error message when trying to install Matrix-Cli.

npm install -g matrix-cli
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t https://github.com/matrix-io/matrix-app-config-helper.git
npm ERR!
npm ERR! xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun
npm ERR!
npm ERR! exited with error code: 1

Hey @damsonlee
Looks like you need to accept your Xcode terms before using tools such as git
The comments on this StackOverflow question seem to lead to a solution

Running
xcode-select --install
or
xcode-select --reset
should allow you to accept the terms and continue the cli installation

Thank you! I installed xcode-select and it works now.