# Changelog

This changelog is generated automatically from [GitHub Releases](https://github.com/typeerror/elf/releases).


# elf 1.2.0

*2026-11-15* · [GitHub](https://github.com/TypeError/elf/releases/tag/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 new` with an interactive Python puzzle template.
- Added `elf doctor` for 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

*2025-12-04* · [GitHub](https://github.com/TypeError/elf/releases/tag/1.1.1)


## v1.1.1 -- Bug Fix Release


### Bug Fixes

- Fixed an issue where guesses that previously returned a [WAIT](reference/models.SubmissionStatus.html#elf.models.SubmissionStatus.WAIT) (throttle) response were incorrectly treated as permanent duplicates after the cooldown TTL expired.\
  Now, [WAIT](reference/models.SubmissionStatus.html#elf.models.SubmissionStatus.WAIT) responses are ignored during duplicate detection once the throttle window has passed, allowing the guess to be properly evaluated.\
  **Thanks [<span class="citation" data-cites="tanzimfh">@tanzimfh</span>](https://github.com/tanzimfh) for the great catch and contribution!**

- Improved cache semantics so only guesses with real evaluations ([TOO_LOW](reference/models.SubmissionStatus.html#elf.models.SubmissionStatus.TOO_LOW), [TOO_HIGH](reference/models.SubmissionStatus.html#elf.models.SubmissionStatus.TOO_HIGH), [INCORRECT](reference/models.SubmissionStatus.html#elf.models.SubmissionStatus.INCORRECT), [CORRECT](reference/models.SubmissionStatus.html#elf.models.SubmissionStatus.CORRECT), [COMPLETED](reference/models.SubmissionStatus.html#elf.models.SubmissionStatus.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

*2025-12-01* · [GitHub](https://github.com/TypeError/elf/releases/tag/v1.1.0)

**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 [<span class="citation" data-cites="NotTheEconomist">@NotTheEconomist</span>](https://github.com/NotTheEconomist) 🎅)

- Cleaned up the internal User-Agent validation logic.
- Sanitizes newline and whitespace characters before validation.
- Improves warnings and error paths when `AOC_USER_AGENT` is missing or invalid.
- Ensures elf always sends a correctly formatted, compliant User-Agent header.


### File Input Helpers

- Improved [read_input()](reference/helpers.read_input.html#elf.helpers.read_input):

  - Uses `is_file()` instead of `exists()` for safer checks.
  - Clearer error messages that include the full path.
  - More robust behavior when reading local input files.


### Documentation

- Updated README to show how to save puzzle inputs to files.
- Added a new section describing `AOC_USER_AGENT` and how to configure it.

Happy coding, and good luck on this year's puzzles! 🎄


# elf v1.0.0 First Public Release

*2025-11-29* · [GitHub](https://github.com/TypeError/elf/releases/tag/v1.0.0)


## 🎄 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):

``` sh
uv tool install elf
```

Using pip:

``` sh
pip install elf
```


### Requirements

- Python 3.11 or newer
- AOC_SESSION environment variable set for most commands


### Quick Start

``` sh
# 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 open
```


### Thanks

Special thanks to Eric Wastl for creating Advent of Code and inspiring a global tradition each December.

Thank you to [<span class="citation" data-cites="solos">@solos</span>](https://github.com/solos) for donating the elf package name on PyPI.
