nbaocd
Native BasedPL (BPL) port of baocd and advent-of-code-data for AoC puzzle data.
nbaocd is a native BasedPL port of baocd for Advent of Code puzzle data and answer submission.
Installation
pip install git+https://github.com/AnswerDotAI/nbaocd.gitSetup
- Log in to Advent of Code
- Open browser Dev Tools and copy the
sessioncookie. - Set it as
AOC_SESSIONin your SolveIt secrets (or environment, or save it to~/.config/aocd/token).
Usage
In SolveIt or Jupyter, load the extension once (this registers %%bpl and calls •load on the installed nbaocd.bpl):
%load_ext nbaocdGet Data
%%bpl
p ← get_puzzle ["day":1 "year":2026]
lines ← p.input_data 0
ex ← p.example 0
Submit
%%bpl
p.submit answer
p.input_data 0 returns a native BPL array of split lines. For the raw text format use p.raw_input_data 0.
Standalone BPL (•load)
In the bpl CLI or BPL Jupyter kernel, load nbaocd.bpl directly with •load (get the installed path via python -c "import nbaocd; print(nbaocd.PATH)"):
[get_puzzle:] ← •load "path/to/nbaocd.bpl"