Skip to content
/ scaf Public

🏗️ A simple tool for scaffolding Advent of Code tasks

License

Notifications You must be signed in to change notification settings

szymmis/scaf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏗️ scaf

A simple tool for scaffolding Advent of Code tasks

npm downloads-per-week license

🤔 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 variable SCAF_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.

⚖️ License

MIT

About

🏗️ A simple tool for scaffolding Advent of Code tasks

Resources

License

Stars

Watchers

Forks