Advent of Code toolkit for Node.js.
A minimal CLI that fetches your puzzle input using an AOC_SESSION cookie.
npm i -g wassail# Export your Advent of Code session cookie
export AOC_SESSION=your_session_cookie
# Fetch today's input
wassail
# Fetch a specific year/day
wassail --year 2025 --day 1-y, --year Year of the puzzle (defaults to current year)
-d, --day Day of the puzzle (defaults to 1)
-h, --help Show help
- Node.js 18 or newer (uses built-in
fetch) - A valid
AOC_SESSIONcookie from adventofcode.com
- Log in to Advent of Code in your browser.
- Open Developer Tools → Application/Storage → Cookies.
- Copy the value of the cookie named
session. - Set it in your environment:
export AOC_SESSION=your_session_cookie
- Input is printed to stdout so you can redirect it:
wassail --year 2025 --day 1 > input.txt - Please cache your inputs locally and avoid excessive requests.
- MIT License