install heroku cli with brew
Step 1: Open the terminal on your macOS.
Step 2: Install Homebrew by pasting the following command and pressing Enter:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Step 3: Verify the installation by typing:
brew --version
Step 4: Install the Heroku CLI by using the following Homebrew command:
brew tap heroku/brew && brew install heroku
Step 5: Once the installation is complete, verify the Heroku CLI installation by typing:
heroku --version
Step 6: You can now use the Heroku CLI by logging in with your Heroku credentials:
heroku login
Step 7: Follow the instructions in the terminal to log in to your Heroku account.