Advent of Ruby

A CLI app for doing Advent of Code in Ruby

March 31, 2025 · Felipe Vogel ·

I’ve been working on Advent of Ruby, a CLI tool for doing Advent of Code in Ruby. Besides the usual features of such tools, it can also show other people’s solutions.

I heard about Advent of Code years ago, but I never had the guts to try it out because I knew I’d give up in the first week. December is stressful enough without 25 days of increasingly difficult code puzzles, where I would inevitably measure my self-worth by how pathetically soon I bail out. (Yeah, I should probably talk to my therapist about that.)

Then it dawned on me that I can ignore the new puzzles in December and simply work on past years’ puzzles at my own leisurely pace at any time of year.

So I solved a few old puzzles and found it enjoyable. Except… there was a lot of juggling files and browser tabs: downloading each puzzle’s input file, creating files for my solution and automated tests, submitting my solution, and looking up other people’s solutions on GitHub and Reddit.

I thought, “I spend a lot of time on this task. I should write a program automating it!”

Building on an existing gem

There are several Advent of Code utility gems out there already. I decided to build on AoC-rb because it’s simple and already does some of what I want with its two core commands:

I added two new commands, commit for committing new/modified solutions to Git, and progress for showing overall progress across years.

But mostly I expanded the existing bootstrap and run commands:

Because of how arguments are inferred like this, the workflow can be as simple as arb bootstraparb run repeatedly → arb commit → repeat for the next puzzle. See it in action in the demo video.

Technical challenges

I did a few new things in this project:

Reconnecting with my inner Ruby learner

I had fun building this gem. It took me back to when I was learning Ruby by doing exercises on Exercism. In fact, Exercism inspired this gem: I wanted to recapture the joy of using a cohesive UI to solve a programming puzzle and then scroll through other people’s Ruby solutions, often having my mind blown by an elegant approach that I never would have thought of.

Also, I know that solving all past Advent of Code will take anywhere from a few years to the rest of my life, but at least now I have more motivation in the fact that I need to make the time that I spent working on this gem worthwhile—though, according to xkcd, the odds are not good.

👈 Older: How I use MacOS, Linux, Windows, iOS, Android 🚀 Back to top