Progress bar terraform add on

Hi, any feedback is welcome regarding a progress bar add on to terraform.

How to use:
terraform plan | npx tfh

More info: GitHub - oferca/tf: A progress bar for terraform commands

Hi @ofer.c!

Thanks for sharing this. It looks like a great alternative UI for those who want to get only a summary of Terraform’s progress in the terminal, and use a more interactive view (in a browser) for investigating the details.

I see that you’ve implemented it by having your program parse lines of human-oriented output from Terraform CLI, which I suppose is unavoidable if you want the user experience of just piping the normal Terraform CLI output into it, but note that the exact messages used by Terraform CLI when it thinks it’s talking to a human (by default) are not covered by the Terraform v1.x Compatibility Promises, and so future versions of Terraform might use different messages that your program then wouldn’t recognize.

One way you could avoid that is to change your program to be a wrapper around Terraform rather than consuming its output, and then make it run terraform plan -json to activate the machine-readable UI mode, which describes the same events that the human-oriented UI would but does so using a stream of JSON objects (one per line), which is therefore easier for a program like yours to parse and not expected to change in breaking ways in future versions of Terraform.

Thank you @apparentlymart ! for the very insightful answer.
Yes you’re right, as this alternative ui is limited by the possible backward incompatibility, plus it requires nodejs local installation.
I still feel that there might be room for different ux experiences while using terraform commands. So as the next phase I converted it to a vscode extension. Taking advantage of the native javascript support in vscode and it’s progress bar api. Hope it can contribute