Getting Started
Installation
sh
[pnpm|npm|yarn|bun] init
[pnpm|npm|yarn|bun] install -D @aockit/cli @aockit/core esbuild@0.24.0Usage
Setup:
sh
[pnpm|npm|yarn|bun] init
[pnpm|npm|yarn|bun] install -D @aockit/cli @aockit/core esbuild@0.24.0Then run pnpm aoc init (you may have to check the specifics for other package managers, or just add aoc as a package.json script.)
This will scaffold a year folder for your current year by default.
At this point, you'll need to add your Advent of Code browser session key, which requires a few more steps:
- Open adventofcode.com and log in.
- Open your Chrome or Firefox DevTools (F12).
- Go to the Application tab.
- On the sidebar, under the Storage section, expand Cookies and click on https://adventofcode.com.
- Find the cookie named "session" and copy its value.
- Export this value in your shell's config file with the name
AOC_SESSION. e.g.export AOC_SESSION="your_session_key"
Now, to start a day, run: pnpm aoc start <day>.
This will scaffold your day folder, download your input and instructions, save them locally, generate a minimal TypeScript file, and start the development server.