CLI Reference¶
Global Options¶
These options apply to all subcommands.
-v, --verbose¶
Increase Nix log verbosity. Repeatable up to three times:
| Flag | Nix log level | Description |
|---|---|---|
| (none) | 0 (lvlError) | Errors only |
-v |
3 (lvlInfo) | Informational |
-vv |
5 (lvlChatty) | Chatty output |
-vvv |
7 (lvlVomit) | Everything |
--help-all¶
Show the full help for all subcommands.
translate¶
Pipe Nix build output into JUnit XML.
Reads @nix JSON protocol lines from stdin, parses them, and produces a JUnit XML
report on stdout (or to a file with -o).
Non-@nix lines from stderr are forwarded to stderr. Nix log messages are forwarded
according to the verbosity level.
Options¶
| Option | Description |
|---|---|
-o, --output FILE |
Write XML to FILE instead of stdout |
-v, --verbose |
Increase Nix log verbosity (repeatable) |
Example¶
nix build --log-format internal-json -v --print-build-logs --no-link .#pkg1 2>&1 | junix translate -o result.xml
build¶
Run nix build and produce JUnit XML.
Runs nix build --log-format internal-json for the given attribute paths, parses the
output, and produces a JUnit XML report.
Options¶
| Option | Description |
|---|---|
ATTRS |
Nix store paths or flake attributes to build |
-o, --output FILE |
Write XML to FILE instead of stdout |
-s, --store PATH |
Add a Nix store path to the report |
-v, --verbose |
Increase Nix log verbosity (repeatable) |
Example¶
check¶
Discover and run all flake checks, producing a JUnit report.
Runs nix flake show --json to discover checks, then builds each one with
nix build --log-format internal-json. Each check becomes a test case in the JUnit
report.
Options¶
| Option | Description |
|---|---|
-o, --output FILE |
Write XML to FILE instead of stdout |
--build-arch ARCH |
Filter checks by build architecture (repeatable) |
--eval-arch ARCH |
Filter checks by evaluation architecture (repeatable) |
-v, --verbose |
Increase Nix log verbosity (repeatable) |
Example¶
Filter checks for specific architectures: