Audit is a CLI tool that helps you validate and refactor your advent of code solutions. Supports any language, and can be used as a pipe.
Warning
Audit doesn't download inputs or check your answers on advent of code; it's used to refactor your code once you've came up with an initial solution.
You can use cargo install audit-cli
to install the CLI tool on your system, with the aud
alias (given you have Rust installed)
- Create a configuration file in your project (default:
.audit.toml
) - Make sure your advent of code solutions print to the standard output, such as:
Day 1
Part 1: 123
Part 2: 456
- Run
aud
with your advent of code program, such asaud python day1.py
Tip
You can also pass aud
as a pipe, such as python day1.py | aud
You can specify a custom configuration path with the -c/--config
flag, such as python day1.py | aud -c audit.toml
"$schema" = "https://raw.githubusercontent.com/durocodes/audit/main/schema.json" # <- optional editor support
[[solutions]]
day = 1
part1 = "123"
part2 = "456"
[[solutions]]
day = 2
part1 = "789"
part2 = "012"
# ...
You can find a minimal example in the example
directory, which contains a Python "solution" and a configuration file.
The example can be run with python runner.py | aud
(make sure you're in the example
directory)