Skip to content

CLI to download & submit Advent of Code puzzles and solutions

License

Notifications You must be signed in to change notification settings

Design0r/rust-aoc-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code CLI

A Rust based Command Line Utility to download puzzles and input data and submit your solution for Advent of Code.

Features

  • Download puzzles and input data
  • Automatic Project scaffolding for supported Languages (Based on detecting Cargo.toml or go.mod file, othwerwise chooses Python)
    • Rust
    • Python
    • Go
  • Handles session cookie
  • Directly submit your solution and check if your result is correct

Installation

This command compiles and installs the "aoc" cli in the ~/.cargo/bin directory

cargo install --path .

Usage

  1. Store your Advent of Code Session cookie
aoc cookie [COOKIE]

----------------------------------------------

Arguments:
  [COOKIE]

Options:
  -h, --help  Print help
  1. Download a puzzle
aoc download [OPTIONS] --day <DAY> [PATH]

----------------------------------------------

Arguments:
  [PATH]  Optional field for the project path. If empty creates project folders in current working directory

Options:
  -d, --day <DAY>    Specify the Advent of Code Day you want to download. A number between 1 and 25
  -y, --year <YEAR>  Specify the Advent of Code year you want to download from. A number between 2015 and 2024
  -h, --help         Print help
  1. Submit a solution
aoc submit --day <DAY> --year <YEAR> --part <PART> <SOLUTION>

----------------------------------------------

Arguments:
<SOLUTION> Your Advent of Code Solution. Expects a number

Options:
-d, --day <DAY> Specify the Advent of Code Day you want to submit. A number between 1 and 25
-y, --year <YEAR> Specify the Advent of Code year you want to download from. A number between 2015 and 2024
-p, --part <PART> Specify the Advent of Code Part you want to submit. A number between 1 and 2
-h, --help Print help

Commands

aoc <COMMAND>

----------------------------------------------

Commands:
download Download an Advent of Code puzzle
submit Submit your Advent of Code solution
cookie Set your Advent of Code session cookie
help Print this message or the help of the given subcommand(s)

Options:
-h, --help Print help
-V, --version Print version

About

CLI to download & submit Advent of Code puzzles and solutions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages