An Advent of Code command-line tool developed using Node.js.
Both packages require Node.js 20 or newer when used with Node.js.
For the command-line tool:
# ✨ Auto-detect
npx nypm install -g @bryan-hoang/aoc-cli
# npm
npm install -g @bryan-hoang/aoc-cli
# yarn
yarn add -g @bryan-hoang/aoc-cli
# pnpm
pnpm install -g @bryan-hoang/aoc-cli
# bun
bun install -g @bryan-hoang/aoc-cli
# deno
deno install -g @bryan-hoang/aoc-cli
# Running the tool
aoc <args>
# or
aoc-cli <args>or
# npm
npx @bryan-hoang/aoc-cli@latest <args>
# pnpm
pnpm dlx @bryan-hoang/aoc-cli@latest <args>
# bun
bunx @bryan-hoang/aoc-cli@latest <args>
# deno
deno run -A npm:@bryan-hoang/aoc-cli@latest <args>For the client library:
# ✨ Auto-detect
npx nypm install @bryan-hoang/aoc-client
# npm
npm install @bryan-hoang/aoc-client
# yarn
yarn add @bryan-hoang/aoc-client
# pnpm
pnpm add @bryan-hoang/aoc-client
# bun
bun install @bryan-hoang/aoc-client
# deno
deno install npm:@bryan-hoang/aoc-clientFor the command-line tool:
$ aoc help
An Advent of Code command-line tool
USAGE aoc [OPTIONS] submit|download|help
COMMANDS
submit Submit puzzle answer
download Save puzzle description and input to files
help Print this message or the help of the given subcommand(s)
OPTIONS
-d, --day <DAY> Puzzle day [default: last unlocked day (during Advent of Code month)]
-y, --year <YEAR> Puzzle year [default: year of current or last Advent of Code event]
-s, --session-file <PATH> Path to session cookie file [default: /home/bryan/.config/advent-of-code/session-cookie.txt]
-h, --help Print help information
--version Print version informationFor the client library:
ESM (Node.js, Bun, Deno)
import { AocClientBuilder, AocClient } from "@bryan-hoang/aoc-client";CommonJS (Legacy Node.js)
const { AocClientBuilder, AocClient } = require("@bryan-hoang/aoc-client");CDN (Deno and Browsers)
import { AocClientBuilder, AocClient } from "https://esm.sh/@bryan-hoang/aoc-client";PRs accepted.
Small note: if editing the README, please conform to the standard-readme specification.
MIT © 2024 Bryan Hoang
Functionality is inspired by scarvalhojr/aoc-cli. Project structure is inspired by nuxt/cli.
🤖 auto updated with automd