🎅 Solutions for Advent of Code 2023 written in TypeScript.
I'm using Bun this year. Find instructions to install the Bun executable here.
Install the dependencies using Bun.
bun install
Create a .env
file at the root that contains your Advent session
cookie. You can find this cookie value by inspecting the network request made to https://adventofcode.com
in the browser.
# .env
ADVENT_SESSION=YOUR_SESSION_COOKIE
I've provided a scaffold
package.json
script that will set up the files needed for solving both parts for each day, as well as pulling your unique input. It will output them in a solutions/DAY_NUMBER
directory.
# The following will create a solutions/01 directory and place all necessary files there.
bun scaffold 1
Run the solve
package.json
script to execute the solution code for a given day.
bun solve 1
You can pass a --debug
or -d
flag to launch the Bun web debugger.
bun solve 1 -d