5 releases
new 0.1.4 | Dec 3, 2024 |
---|---|
0.1.3 | Dec 3, 2024 |
0.1.2 | Nov 27, 2024 |
0.1.1 | Nov 27, 2024 |
0.1.0 | Nov 27, 2024 |
#200 in Development tools
355 downloads per month
200KB
182 lines
Audit
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.
Installation
You can use cargo install audit-cli
to install the CLI tool on your system, with the aud
alias (given you have Rust installed)
Usage
- 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 aspython day1.py | aud
Configuration
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"
# ...
Example
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)
Dependencies
~3.5–5.5MB
~96K SLoC