Your trusty companion for Advent of Code in Elixir! 🌟
This helper streamlines your Advent of Code workflow, letting you focus on the fun part – solving puzzles!
- Day Generation: Scaffold new day files with
mix aoc.gen.day. - Input Fetching: Automatically download your puzzle input with
mix aoc.fetch. - Solution Runner: Run your solutions with
mix aoc.run. - Solution Tester: Test your solutions with
mix aoc.test.
-
Clone the repo:
git clone git@github.com:holubowicz/aocdotex.git && cd aocdotex
-
Install dependencies:
mix deps.get
-
Set your session cookie: To fetch your puzzle inputs, you'll need to set your Advent of Code session cookie as an environment variable.
export AOC_SESSION="your_session_cookie_here"
You can find this in your browser's developer tools while logged into the Advent of Code website.
For convenience, you can add this to a
setup.fishorsetup.shfile (examples provided) and source it.cp setup.sh.example setup.sh # Edit setup.sh to add your session cookie source ./setup.sh
This command creates the solution file, test file, and an empty input file for the given day.
mix aoc.gen.day <year> <day>Example:
mix aoc.gen.day 2025 1If your AOC_SESSION is set, it will even fetch the input for you!
If you've already generated the files, you can fetch the input separately.
mix aoc.fetch <year> <day>Example:
mix aoc.fetch 2025 1Execute your solution for a specific day and part.
mix aoc.run <year> <day> [part]partcan beoneortwo.- If
partis omitted, it will run both parts.
Example:
mix aoc.run 2025 1
mix aoc.run 2025 1 one
mix aoc.run 2025 1 twoRun the tests for a specific day's solution.
mix aoc.test <year> <day>Example:
mix aoc.test 2025 1