{"id":23153742,"url":"https://github.com/nbbaier/advent-of-code","last_synced_at":"2026-04-18T10:33:44.424Z","repository":{"id":268289591,"uuid":"903877778","full_name":"nbbaier/advent-of-code","owner":"nbbaier","description":"my advent of code solutions","archived":false,"fork":false,"pushed_at":"2025-01-04T22:17:42.000Z","size":284,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T16:47:28.652Z","etag":null,"topics":["advent-of-code","advent-of-code-2015","advent-of-code-2024","advent-of-code-typescript","aoc","aoc-2015","aoc-2024","bun"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nbbaier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-15T19:34:01.000Z","updated_at":"2025-01-04T22:17:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"9de03a5b-f503-4905-ac46-8f590c8c420b","html_url":"https://github.com/nbbaier/advent-of-code","commit_stats":null,"previous_names":["nbbaier/advent-of-code"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nbbaier/advent-of-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbbaier%2Fadvent-of-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbbaier%2Fadvent-of-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbbaier%2Fadvent-of-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbbaier%2Fadvent-of-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nbbaier","download_url":"https://codeload.github.com/nbbaier/advent-of-code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbbaier%2Fadvent-of-code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281731087,"owners_count":26551804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["advent-of-code","advent-of-code-2015","advent-of-code-2024","advent-of-code-typescript","aoc","aoc-2015","aoc-2024","bun"],"created_at":"2024-12-17T20:09:49.063Z","updated_at":"2026-04-18T10:33:44.418Z","avatar_url":"https://github.com/nbbaier.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of Code\n\nThis repository contains solutions and a runner for Advent of Code, built with Bun and TypeScript.\n\n## Prerequisites\n\n-  [Bun](https://bun.sh/) (latest version recommended)\n\n## Installation\n\n1. Clone the repository.\n2. Install dependencies:\n   ```bash\n   bun install\n   ```\n\n## Setup\n\nCreate a `.env` file in the root directory to store your session cookie. This is required for downloading inputs and puzzle descriptions.\n\n```env\nAOC_SESSION=your_session_cookie_here\n```\n\n## Usage\n\nThe project includes several scripts to help manage and run your solutions. The CLI defaults to the current day and year if options are omitted.\n\n### Scaffolding a New Day\n\nSets up the directory structure for a new day, creates solution files from templates, and downloads the input and puzzle description.\n\n```bash\nbun run scaffold [-d|--day \u003cday\u003e] [-y|--year \u003cyear\u003e] [-f|--force]\n```\n\nOptions:\n\n-  `-d, --day \u003cday\u003e`: Day number (1-25), defaults to current day\n-  `-y, --year \u003cyear\u003e`: Year (e.g., 2024), defaults to current year\n-  `-f, --force`: Force re-download even if files exist\n\nExample:\n\n```bash\nbun run scaffold -d 1 -y 2024\n```\n\n### Running Solutions\n\n**Test against sample input:**\nRuns the solution using `sample.txt`.\n\n```bash\nbun run try [-d|--day \u003cday\u003e] [-y|--year \u003cyear\u003e]\n```\n\n**Run against real input:**\nRuns the solution using `input.txt` and displays execution time.\n\n```bash\nbun run attempt [-d|--day \u003cday\u003e] [-y|--year \u003cyear\u003e]\n```\n\n### Reading the Puzzle\n\nDownloads the puzzle description to `puzzle.md` if it doesn't already exist.\n\n```bash\nbun run read [-d|--day \u003cday\u003e] [-y|--year \u003cyear\u003e] [-f|--force]\n```\n\n### Refreshing the Puzzle\n\nRe-downloads the puzzle description (useful after solving part 1 to see part 2).\n\n```bash\nbun run refresh [-d|--day \u003cday\u003e] [-y|--year \u003cyear\u003e]\n```\n\n### Testing\n\nRun all tests using Vitest:\n\n```bash\nbun run check\n```\n\nRun tests in watch mode:\n\n```bash\nbun run watch\n```\n\n## Project Structure\n\n-  `src/`: Source code for the CLI and utilities\n   -  `src/commands/`: Individual command implementations\n   -  `src/utils/`: Utility functions for CLI helpers, downloading, testing, etc.\n   -  `src/templates/`: Eta templates (`.eta` files) for generating new solution runners and tests\n-  `aoc/[year]/[day]/`: Generated solution files (runner, tests, input, puzzle.md, etc.)\n\n## Templates\n\nTemplates use [Eta](https://eta.js.org/) syntax. Variables are accessed via `it` (e.g., `\u003c%= it.year %\u003e`, `\u003c%= it.day %\u003e`). To customize templates, edit the `.eta` files in `src/templates/`.\n\n## \\*_License_\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnbbaier%2Fadvent-of-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnbbaier%2Fadvent-of-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnbbaier%2Fadvent-of-code/lists"}