How to view real time dynamically updated information on thermals and fan speed through the terminal? Is there any way to view real time fan speed and thermal information (CPU, GPU) through the terminal, such as by installing an application with homebrew (i.e. $ brew install ...) or python (i.e. $ pip install ...)?

I found the threads below:

Using terminal to get current fan speed?

Can I get the CPU temperature and fan speed from the command line in OS X?

However the suggestions for terminal applications (such as istats) only give static information (not real time dynamically update information).

There is a github repo called lm-sensors which was designed for linux, however this repo has not been updated in a while and I was not able to install it properly after cloning the git. After I run the Make file, I get errors about header files being missing. 

I am running OS X 10.15.4 (Catalina).
This Github repo has a program that can provide CPU temperature and fan speed on macOS and may be useful to you. If it only displays the readings one time, when you run it, just use the watch command to run it continously. (You can install watch using MacPorts or Homebrew). 



With regards to CPU temperature and power monitoring:

If you have an intel based Apple Mac, the Intel Power Gadget is a very useful application in getting accurate cpu core, temperature and power usage information. 

While Intel Power Gadgets is a GUI based app it also includes a command line tool called PowerLog. (You can find PowerLog in Intel Power Gadget folder in Applications, after you install the Intel Power Gadget App).

Intel PowerLog doesn't display the information in realtime in the terminal, when run, but produces a log file. But you can use the unix tail command to view the log while it is being generated and thus get the output in realtime. 

If you know how to code, Intel also provides an Intel Power Gadget API that you can use to create your own cpu monitoring program.



The app Mac Fans Control provides realtime infromation on cpu fan speed and temperature:



If you are willing to pay for their software, contact them and ask if they can provide a command line version of the same app.