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
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 install daltonsw/tap/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
- Go to Advent of Code and login with your preferred method
- Access Dev Tools (either F12 or Right-Click -> Inspect)
- Click the
Storage
tab at the top of the section - Locate the
session
token. Double click theValue
and copy it - Place the session token in one of the following places:
~/.config/aocgo/session.token
AOC_SESSION_TOKEN
environment variable*
- 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
- Eric Wastl: Creator of Advent of Code. Thanks for providing years of entertainment and fun puzzles :)
- CharmBracelet: Creators of BubbleTea and LipGloss
- My friend, David, who guinea-pig’d the program along the way