#advent #aoc #cli #tool

app arrive

A simple CLI tool for interacting with Advent of Code

4 releases

0.2.0 Dec 9, 2022
0.1.2 Dec 6, 2022
0.1.1 Dec 6, 2022
0.1.0 Dec 6, 2022

#1991 in Command line utilities

21 downloads per month

MIT license

415 lines


GitHub release (latest SemVer) Crates.io


A simple tool to fetch your Advent of Code input and submit your solutions.

Key features and goals:

  • keeps your current AOC day selection and solution status in a TOML state file (for human readability)
  • caches input files to ease load on AOC servers
  • reasonably minimal dependencies

Directories used (see dirs for more info):

Description Path
Cache ${XDG_CACHE_HOME}/arrive or ${HOME}/.cache/arrive
State ${XDG_STATE_HOME}/arrive or ${HOME}/.local/state/arrive


Via Cargo:

cargo install --locked arrive

From source:

git clone https://github.com/tranzystorek-io/arrive.git
cargo install --path arrive


Set a new session token (see Token section):

arv token set <token>

Print currently stored session token:

arv token show

Select currently processed advent day:

arv select -y <year> -d <day>

Show current selection and day completion status:

arv status

Print input for current selection:

arv input

Save input to file:

arv input > path/to/file.txt

Submit advent solution for current selection. If <solution> is omitted, STDIN is read instead.

arv submit [<solution>]


For the web commands (arv input, arv submit) to work, a valid AOC session token needs to be supplied to arv token set.

To obtain such a token, do the following:

  1. Login to AOC: https://adventofcode.com/auth/login
  2. In your browser, open the developer tools
  3. Navigate to Storage -> Cookies
  4. Find and copy the entry named session
  5. Run arv token set <token>

These tokens have long expiration dates, so you can typically set-and-forget once.


Deeply inspired by aocf!


~64K SLoC