@szymmis/scaf v0.10.1
๐๏ธ scaf
A simple tool for scaffolding Advent of Code tasks
๐ค Why Scaf?
Advent of Code is fun, but setting up tasks every day can be tedious. scaf simplifies this by automating the setup, letting you focus on solving puzzles. It does this by fetching task info directly from the website and creating a directory structure and files for the task, including the input data file. You can select from multiple languages, as long as there is a template for that.
๐ Usage
Installation
Install scaf globally using npm to make it accessible as a CLI tool:
npm install -g @szymmis/scaf
Authorizing into the AoC
- Go to the Advent of Code website and login
- Open browser devtools and copy
session
cookie value - Use
scaf login
command or setup the env variableSCAF_TOKEN=<value>
in your shell
Scaffolding a task
Use the init command to create a new task's folder and files for a specific day and programming language:
scaf init <lang> <year>/<day>
lang
: The programming language you want to use (e.g.,go
,rust
,py
).year/day
: The Advent of Code year and day to scaffold (e.g.,2023/01
).
Advancing to the second part
When youโre ready to tackle part two of the day's puzzle, use the advance
command:
scaf advance <year/day>
year/day
: The year and day of the task you're advancing (e.g.,2023/01
).
This command generates the necessary files or updates your workspace to prepare for solving part two.