Introducing aocli

Welcome!

aocli is a command-line designed to interface with Advent of Code without leaving your terminal. Written in Go to ensure speediness, and using bubbletea and lipgloss for pretiness, aocli strives to enhance your Advent of Code experience.

With it, you can:

  • get your puzzle input
  • view the puzzle for a day
  • submit your guess
  • check out leaderboards
  • look at your user information

aocli Landing Page

Installation

You can install aocli in one of the following ways, listed in recommended order. aocli has a self-updater built in, so you can use that to update it going forward.

GitHub Releases

Check out the latest GitHub release, found here. Download the version for your OS.

Homebrew

Note: Can’t be used on Windows

Ensure you have brew installed. Then, run the following:

brew tap daltonsw/packages
brew install aocli

Using Go

Note: Might not install the most up-to-date version, since it will go by the overall module version, but you can use the built-in updater after install.

Ensure you have Go installed. Then, run the following:

go install go.dalton.dog/aocli@latest

Ensure you have $GOPATH on your $PATH.

Required Setup

  1. Go to Advent of Code and login with your preferred method
  2. Access Dev Tools (either F12 or Right-Click -> Inspect)
  3. Click the Storage tab at the top of the section
  4. Locate the session token. Double click the Value and copy it
  5. Place the session token in one of the following places:
    • ~/.config/aocgo/session.token
    • AOC_SESSION_TOKEN environment variable*
  6. Run aocli health to ensure the program can find the token properly

*If you choose the environment variable method, ensure you include a line to set it in your shell’s startup script so it gets set every launch.

After Installation

To view the available commands, check out the command list here or run aocli help once installed.

Check out the repository here. It has required setup instructions and a list of available commands with examples.

Shoutouts