I made a thing I think is pretty cool. It’s an indeterminate progress indicator for use in your scripts, inspired by the way Cursor indicates it’s working.
In Cursor, when it’s generating or thinking, it shows some text that looks like a spotlight is panning across it. I figured it would be easy enough to replicate, so I did.
Here’s what it looks like:
To use it in a script, just save the code in the gist to a file called ripple in your $PATH (or right next to your script). Then call ripple "TEXT TO RIPPLE" -c "COMMAND TO RUN". Ripple will run the command, and while it’s waiting it will “ripple” the text provided.
It has some options:
$ ripple -h
Usage: ripple [options] STRING
-s, --speed SPEED Set animation speed ((f)ast/(m)edium/(s)low)
-r, --rainbow Enable rainbow mode
-d, --direction DIRECTION Set animation format ((f)orward/(b)ack-and-forth)
-i, --inverse Enable inverse mode
-c, --command COMMAND Run a command during the animation
--stdout Output captured command result to STDOUT
--quiet Suppress all output
-v, --version Display the version
-h, --help Display this help message