This repository contains my solutions to Advent of Code challenges over the years. All solutions are written in TypeScript and executed using Bun.
Note: This repository is based on a template I created, which is available at aoc-bun.
Solutions are organized by year and day.
Each day contains:
1.ts- Solution for Part One2.ts- Solution for Part Twoindex.ts- Entry point that runs both parts with benchmarkinginput.txt- Puzzle inputexample.txt- Example input (if used)
Run a specific day's solution:
bun run aoc <year> <day>Example:
bun run aoc 2025 1This will execute both parts of the solution and display results with performance metrics.
To scaffold a new day's solution structure and fetch the input:
bun run aoc:generate --day <day>Note: This requires environment variables:
AOC_SESSION- Your Advent of Code session cookieYEAR- The year of the puzzle you are working on (e.g.,2025)
The script will:
- Create the day directory structure
- Fetch your personalized input from Advent of Code
- Generate template files for both parts
- Create an
index.tsentry point
Run a solution in watch mode for development:
bun run aoc:watch <year> <day>Format all TypeScript files:
bun run format- Benchmarking: Each solution includes performance metrics (execution time and memory usage)
- Type Safety: Full TypeScript support with proper typing
- Template Generation: Automated scaffolding for new days
- Input Fetching: Automatic download of puzzle inputs from Advent of Code
- Bun (latest version recommended)
Braeden Kilburn