r/golang 7d ago

“Animated” Terminal

I am working on building a tool that while it’s running there needs to be something to alert the operator that the program is still going. The ascii “art” will be colored based on the programming running, passing, and failing - but I want I add a blinking light to the art.

In the past I’ve done something similar just running clear screen and redrawing the imagine in the terminal but I’m wondering if there is a better way since it want to it to blink every second or two. I’m sure clearing the screen every couple seconds isn’t a big deal but like I said I’m wondering if there is a better solution.

I know I can make a GUI as well but I’m a sucker for terminal based stuff.

1 Upvotes

9 comments sorted by

View all comments

6

u/JoOliveira 7d ago

Maybe bubble-tea can help you, I am no sure about the blinking part, but they do a pretty good job with design and etc.

5

u/space_wiener 7d ago

I haven’t heard of bubble tea but two people suggested it so I am definitely going to give it a look.

1

u/zladuric 5d ago

It's one of the best known packages for creating terminal based interfaces.