Home

Awesome

Advent of Code CLI

A commandline interface to interact with the Advent of Code.

Usage:

Commands / Features:

aoc-cli init [-l/--lang language] [-d/--day day] [-y/--year year] [--debug] [--no-emojis] [-c/--cookie cookie] [--task2]

Initializes a folder for the day, copies the template files of the given language and downloads your puzzle input. By default, uses the current day. If --task2 is given, also tries to download the second challenge description.

aoc-cli solve [task] [-l/--lang language] [-d/--day day] [-y/--year year] [--debug] [--no-emojis] [-c/--cookie cookie] [--submit]

Runs the code for the supplied day with the puzzle input. Also measures execution time. By default, uses the current day and task 1. If --submit is given, also tries to submit your solution, which is the last line of the output of your script, as the solution to the website.

aoc-cli test [task] [-l/--lang language] [-d/--day day] [-y/--year year] [--debug] [--no-emojis]

Runs the code for the supplied day with testing input. Also measures execution time. By default, uses the current day and task 1.

aoc-cli config list|[key] [value] [-l/--lang language]

Updates the config file. If list is given, lists all possible configuration values, including language specific configuration. See below for configuration file reference.

Configuration

Persistent configuration is saved inside the aoc-cli-config.json file, and can be edited via a text editor, or the aoc-cli config command.

Configuration keys

KeyEquivalent cli flagDescription
language-l/--languageSets the default language.
noEmojis--no-emojisWhen set, disables emojis in the output.
cookie-c/-cookieSets the cookie for authenticating with the website.

Language specific configuration:

Python

KeyDefaultDescription
languages.python.executablepythonPython executable to run.

Supported Languages:

Contributing

Adding new Languages