Repository navigation
Releases
elf 1.2.1
- Retry Part 2 after solving Part 1, even if an earlier wrong-level reply left an ambiguous completion entry in the cache.
- Newly generated puzzle files require fresh approval for each submission. If your Advent of Code session changes, reload the input and recompute the answer before submitting.
elf opennow reports browser launch failures and prints the URL so you can open it manually.- Cache locks release automatically when the owning process exits. Finish any running 1.2.0 commands before using 1.2.1 with the same cache.
- Explore the streamlined Positron workflow, expanded CLI guide, and Python API reference. Documentation · Repository
- Updated locked dependencies and the Quarto version used to build the docs.
elf 1.2.0
What's new
- Added first and last star timestamps to private leaderboards.
- Added deterministic CSV leaderboard exports while preserving detailed JSON output.
- Added
elf newwith an interactive Python puzzle template. - Added
elf doctorfor local configuration diagnostics. - Improved calendar-aware defaults and support for reduced-length events.
- Improved account isolation, cache safety, concurrent access, and submission guardrails.
- Added Python 3.11–3.14 testing across Linux, macOS, and Windows.
v1.1.1 — Fix duplicate-guess throttle behavior
v1.1.1 — Bug Fix Release
Bug Fixes
-
Fixed an issue where guesses that previously returned a
WAIT(throttle) response were incorrectly treated as permanent duplicates after the cooldown TTL expired.
Now,WAITresponses are ignored during duplicate detection once the throttle window has passed, allowing the guess to be properly evaluated.
Thanks @tanzimfh for the great catch and contribution! -
Improved cache semantics so only guesses with real evaluations (
TOO_LOW,TOO_HIGH,INCORRECT,CORRECT,COMPLETED) are treated as duplicates.
Notes
- No breaking changes.
- This is a pure bug-fix release and is a drop-in upgrade from v1.1.0.
- If you encountered the “blocked due to repeated guess” issue, updating to v1.1.1 resolves it.
elf v1.1.0 — User-Agent improvements and input helper fixes
elf v1.1.0
Small improvements and refinements to make elf more reliable and user friendly during Advent of Code.
Improvements
User-Agent Handling (thanks @NotTheEconomist 🎅)
- Cleaned up the internal User-Agent validation logic.
- Sanitizes newline and whitespace characters before validation.
- Improves warnings and error paths when
AOC_USER_AGENTis missing or invalid. - Ensures elf always sends a correctly formatted, compliant User-Agent header.
File Input Helpers
-
Improved
read_input():- Uses
is_file()instead ofexists()for safer checks. - Clearer error messages that include the full path.
- More robust behavior when reading local input files.
- Uses
Documentation
- Updated README to show how to save puzzle inputs to files.
- Added a new section describing
AOC_USER_AGENTand how to configure it.
Happy coding, and good luck on this year's puzzles! 🎄
elf v1.0.0 First Public Release
🎄 v1.0.0 First Public Release
What is elf
elf is a fast and modern CLI and Python helper library for Advent of Code. It provides a clean interface for fetching inputs, submitting answers, viewing leaderboards, and tracking your progress. It includes:
- Cached puzzle input fetching
- Safe answer submission with guardrails
- Private leaderboard support with table, JSON, or Pydantic output
- Star status and AoC++ badge display
- Guess history viewer
- Quick browser opening for puzzles or inputs
- Both a CLI (elf) and a Python API (import elf)
Why this release
Advent of Code begins December 1. After years of refining a personal helper tool for my own solving, I am releasing elf publicly so that others can benefit. It is built for casual solvers, automation workflows, leaderboard racers, and those who want a clean and modern Python interface to AoC.
Highlights
- Input fetching with automatic caching
- Answer submission guardrails for safety and cooldown awareness
- Private leaderboard access in table, JSON, or model form
- Star calendar and status views
- Guess history tracking
- Cross platform support with minimal dependencies
Installation
Using uv (recommended):
uv tool install elfUsing pip:
pip install elfRequirements
- Python 3.11 or newer
- AOC_SESSION environment variable set for most commands
Quick Start
# Fetch input for today or first available
elf input
# Submit an answer
elf answer 2025 1 1 12345
# View a private leaderboard
elf leaderboard 2025 1234567 --view-key <VIEW_KEY>
# Show your star status
elf status
# Open today's puzzle in the browser
elf openThanks
Special thanks to Eric Wastl for creating Advent of Code and inspiring a global tradition each December.
Thank you to @solos for donating the elf package name on PyPI.