Liking cljdoc? Tell your friends :D

Advent of code data | aocd

Get your advent of code input every day with a simple function call.

  • download new advent of code input
  • load advent of code input into your code as a String
  • cache input so that you only need to download input once

Clojure version of the scala library by the same name that is in turn based on a python library.


Quick start

(require '[aocd.core :as data])
(data/input 2019 4) => "124075-580769\n"


aocd is available as a Maven artifact from Clojars.


[aocd "0.1.1"]


Advent of code inputs are personal hence a session token is needed in order to fetch your input. aocd supports providing this token in two ways:

# env variable
$ export AOC_SESSION_TOKEN="yoursessionstoken"
# or config file
$ echo "yoursessiontoken" > $HOME/.config/aocd/token


The downloaded input files are stored in


How to get session token

  1. Log in to advent of code.
  2. Open any input link from
  3. Open developer mode

Session cookie from browser

Above was taken from here

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close