how to run mongo export on macbook? I am using mongodb Atlas (M0), which does not provide db backup feature. I am creating a nodejs script that will export all the collections automatically periodically.
So far I have done the following:

created a programmatic api from my login.
whitelisted my ip
installed mongocli
created a default profile using public and private api keys.

And command looks like this:
mongoexport --uri mongodb+srv://${mongoUser}:${mongoPass}@mongoprojectname.lok0l.mongodb.net/${database} --collection ${collection} --type ${fileType} --out ${fileName} --profile default
I am not able to figure out how to run this command. If I run this command in my terminal I get this error:
/bin/sh: mongoexport: command not found\n
You have to import MongoDB tools via .
Download, unzip, and use the export path and run the command below on the terminal and try the export command again.
export PATH=$PATH:inputmongodbtoolpath

If you already use brew, you can try with it.
brew install mongodb-community
brew services start mongodb-community