Ripple: an indeterminate progress indicator

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

Well… this is clever. You inspired me to port it to Python as a context manager. (Thank you!) I can wrap a unit of work in the context manager,

and the “progress bar” (not really a bar) message will animate; when the work is done, the progress bar goes away.

ripple_video

Pretty!

1 Like

That’s awesome, nice work!

Hey @Cavalierex, is this Python version available publicly? I’d be happy to link it!

Yes, I just pushed my koolkit library to a public repo on GitHub. (Koolkit is my junk drawer… er, Swiss Army knife, where I have started to collect various utility functions. It’s an early work-in-progress. I’m going to add stuff there as I refactor a bunch of my projects.)

Here is the link to ripple_progress_bar.py.

Added to the next Web Excursions lineup!

1 Like