Show HN: Elf – A CLI Helper for Advent of Code

github.com

3 points by cak 2 months ago

I built a CLI tool called elf to streamline Advent of Code workflows. It removes a lot of the repetitive steps around fetching inputs, submitting answers safely, and checking private leaderboards.

The tool focuses on: - Input fetching with caching (no repeated downloads, works offline) - Safe answer submissions with guardrails to prevent duplicate or invalid guesses - Private leaderboard viewer (table or JSON) - Status calendar and guess history viewer - Optional Python API for scripting or automation

It’s built with Typer, httpx, Pydantic, and Rich, and aims to be clean, predictable, and easy to extend.

Repo: https://github.com/cak/elf

PyPI: https://pypi.org/project/elf/

Feedback and questions are welcome.

cak 2 months ago

Happy to answer any questions about design choices, caching strategy, the guardrails for safe submissions, or anything else. If anyone uses AoC in a team or automation setup, I’m especially interested in what features would help.

ardata 2 months ago

Does the guess cache sync across machines at all, or is it purely local? I jump between my laptop and desktop for AoC and it'd be annoying to resubmit a 'too low' answer I already tried elsewhere.

  • cak 2 months ago

    Sorry for the delay, I missed this! Great question. The guess cache is local by default, but you can set ELF_CACHE_DIR to point it at a shared folder like iCloud, Dropbox, Google Drive, or anything that syncs across your machines. That will keep your guess history unified so you do not risk resubmitting a too low or too high answer. Happy puzzle solving!

computersuck 2 months ago

I really like the clear explanation of caching behavior in the README. More open source projects should do this and save people time from searching forums or code base for "where does it store X"

  • cak 2 months ago

    Thank you, that means a lot! I tried to make the caching behavior as transparent as possible so folks don’t have to dig through the code to figure out where things live. Really glad it helped, and happy to take suggestions if anything could be clearer.

youchen_ 2 months ago

This looks like a really useful tool for Advent of Code! The caching feature and offline support are great additions. Having a clean CLI interface makes the workflow so much smoother. Thanks for sharing!

  • cak 2 months ago

    Thanks! Caching around inputs and submissions was a priority to keep the workflow fast and predictable. Happy to hear any feedback if you try it out. Really appreciate it, and happy puzzle solving!