npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

aoc-tools

v0.1.4

Published

A set of tools for working with Advent of Code challenges

Downloads

4

Readme

🎄 Advent of Code CLI 🎄

Description

This is a set of command line tools to help automate repetitive tasks and speed up your daily Advent of Code workflow.

Installation

npm install -g aoc-toools

Or, to install the application globally from the repo:

npm install -g .

Usage

To use the application, run the following command after installing the CLI:

aoc

This will display the help menu, which includes a list of available commands and their descriptions.

Commands

new

Create a new item with specified year, day, and an optional template.

aoc new <basePath> <year> <day> [-t <template>] [-s <session>]
  • <basePath>: The location in which to create files and directories.
  • <year>: The year for the problem.
  • <day>: The day of the problem. Must be a number between 1 and 25.
  • -t, --template [template]: Specify a template (optional). Defaults to 'typescript'. For more information on adding templates, see Custom Templates.
  • -s, --session [session]: Specify a session token (optional). Defaults to the value of the AOC_SESSION environment variable. For more information on session tokens, see Puzzle Input.

Example:

aoc new src/problems 2023 15

Custom Templates

Code is generated from templates using Handlebars. You can create custom templates for any language, framework, or style by adding a new directory to the templates directory. The name of the directory will be the name of the template. Inside the directory, you can add any files or directories you want to be created when the template is used. You can use the following variables in your file and directory names to have them replaced with the appropriate values:

  • {{year}}: The year of the problem.
  • {{day}}: The day of the problem.
  • {{puzzleInput}}: The puzzle input for the problem. Refer to Puzzle Input for more information.

Puzzle Input

You can specify a session token to be used to retrieve your own puzzle input for a problem. This can be done in one of two ways:

  1. Set the AOC_SESSION environment variable to your session token.
  2. Pass the session token as an argument to the new command using the -s or --session flag.

You can get your session token by going to the Advent of Code site while logged in, and inspecting your cookies in the DevTools. Search for the string session= and copy the value of the value attribute of the input element. This is your session token.

Features

  • Simple and intuitive CLI commands to save you those precious seconds late at night
  • Customizable templates to support whatever weird ass languages you are using for AoC

Contributing

Contributions to this project are welcome! Please feel free to submit pull requests or create issues for any bugs or enhancements.