advent-of-code-client

Crates.ioadvent-of-code-client
lib.rsadvent-of-code-client
version0.1.1
sourcesrc
created_at2023-12-08 17:05:02.005605
updated_at2023-12-08 17:22:02.479464
descriptionCLI and crate library to interact with Advent of Code
homepage
repositoryhttps://github.com/OliverFlecke/advent-of-code-rust/tree/main/advent-of-code-client
max_upload_size
id1062252
size79,894
Oliver (OliverFlecke)

documentation

README

🎅🎄 Client for Advent of Code 🎄🎅

Crates.io crates.io Documentation

Crate to interact with the yearly challenges at Advent of Code. It functions as both a Rust library and an standalone CLI client.

Installation

Install with:

cargo install advent-of-code-client

It should now be accessable as aoc.

Authentication

To authorize against the Advent of Code site, the CLI expects AOC_TOKEN to be set in your environment with a valid session token, or manually provided with the --token flag.

After authenticating on the website, your session token can be found through the following steps (might vary a bit based on your browser):

  • Go to adventofcode.com and login
  • Open the developer settings in your browser (F12)
  • Go to application -> Cookies.
  • You should see a session variable - this is the token we need.
  • Add this to your environment with export AOC_TOKEN=<your token>

CLI usage

To submit a solution for a given year and day:

aoc 2023 1 -a <your answer>

Use -a to submit an answer for part A, -b for part B.

Commit count: 0

cargo fmt