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
It also works as a Ruby library:
require 'ripple'
rippler = Ripple.new(ARGV.join(" "), { speed: :medium, format: :bidirectional })
Ripple.hide_cursor
while true do
rippler.advance
end
Ripple.show_cursor
# OR
Ripple.progress("IN PROGRESS", { speed: :fast }) { sleep 5 }
Pass a block to Ripple.progress
with a string argument to run some code while the ripple is running.
Just a little fun thing, let me know if you find it useful! Here’s the gist again.
This is a companion discussion topic for the original entry at https://brettterpstra.com/2025/06/30/ripple-an-indeterminate-progress-indicator