1. Open Terminal on your Mac.

  2. Install Homebrew, a package manager for macOS, by running the following command:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. Once Homebrew is installed, use it to install the Heroku CLI by running:

    brew tap heroku/brew && brew install heroku
  4. After the installation is complete, verify that the Heroku CLI is installed correctly by running:

    heroku --version

You are now set up with the Heroku CLI. We can start using Heroku commands to manage our applications.