Skip to content
▁▂▃▅▂▇ in your shell.
Find file
New pull request
Latest commit 1c2a26f @holman Merge pull request #89 from bpeebles/fix-usgs-example
Use new USGS API for earthquake list


sparklines for your shell

See? Here's a graph of your productivity gains after using spark: ▁▂▃▅▇


spark is a shell script, so drop it somewhere and make sure it's added to your $PATH. It's helpful if you have a super-neat collection of dotfiles, like mine. Or you can use the following one-liner:

sudo sh -c "curl -o /usr/local/bin/spark && chmod +x /usr/local/bin/spark"

If you're on OS X, spark is also on Homebrew:

brew install spark


Just run spark and pass it a list of numbers (comma-delimited, spaces, whatever you'd like). It's designed to be used in conjunction with other scripts that can output in that format.

spark 0 30 55 80 33 150

Invoke help with spark -h.

cooler usage

There's a lot of stuff you can do.

Number of commits to the github/github Git repository, by author:

› git shortlog -s |
      cut -f1 |

Magnitude of earthquakes worldwide 2.5 and above in the last 24 hours:

› curl --silent |
  sed '1d' |
  cut -d, -f5 |

Code visualization. The number of characters of spark itself, by line, ignoring empty lines:

› awk '{ print length($0) }' spark |
  grep -Ev 0 |

Since it's just a shell script, you could pop it in your prompt, too:

ruby-1.8.7-p334 in spark/ on master with history: ▂▅▇▂

wicked cool usage

Sounds like a wiki is a great place to collect all of your wicked cool usage for spark.


Contributions welcome! Like seriously, I think contributions are real nifty.

Make your changes and be sure the tests all pass:


That also means you should probably be adding your own tests as well as changing the code. Wouldn't want to lose all your good work down the line, after all!

Once everything looks good, open a pull request.

▇▁ ⟦⟧ ▇▁

This is a @holman joint.

Something went wrong with that request. Please try again.