This Command Line Interface (CLI) application is specifically designed for solving problems from the Advent of Code calendar using the Go programming language. It streamlines the setup and organization of problem-solving environments for each challenge based on the year and problem number. The CLI facilitates quick access to problem files and allows for executing solutions directly from the command line. While currently focused on Go, there are plans to extend support to other programming languages in future updates.
To use this CLI, you need to have Go installed on your machine. If you don't have Go installed, you can download it from the official Go website.
-
Clone the repository to your local machine:
git clone git@github.com:PiyushMishra318/advent-of-code.git
-
Navigate to the cloned directory:
cd advent-of-code
-
Build the CLI tool:
go build -o advent-of-code
After building the application, you can run it using the following syntax:
./advent-of-code [command] [year] [number]
solve <year> <number>
: Sets up the environment for a given problem if it does not exist and compiles and runs the existing solution if it does.try <year> <number>
: Similar tosolve
, but always opens thesolve.go
file in a text editor for editing.--help
,-h
: Displays help information about the CLI commands.
-
To solve a problem for the year 2023, problem number 1:
./advent-of-code solve 2023 1
-
To work on a problem (open in an editor) for the year 2023, problem number 1:
./advent-of-code try 2023 1
-
To display help information:
./advent-of-code --help
Contributions to this project are welcome. Please feel free to fork the repository, make changes, and submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details