2026-07-04 03:01:38 +00:00
# CLI Reference
This is the canonical reference for the implemented Notarius command-line
2026-07-26 13:11:40 +00:00
interface. For the shortest successful run, see the [README ](../README.md ).
Configuration fields, discovery rules, and selectable module keys are defined
in [Configuration ](config.md ); runtime state and recovery procedures are
defined in [Operations ](operations.md ).
2026-07-04 03:01:38 +00:00
2026-07-26 13:11:40 +00:00
## Command Summary
2026-07-04 03:01:38 +00:00
2026-07-26 13:11:40 +00:00
~~~
2026-07-04 03:01:38 +00:00
notarius help
2026-07-26 17:22:27 +00:00
notarius run <pipeline-id> --input path/to/source.json [--json] [flags]
2026-07-17 02:56:31 +00:00
notarius config validate [--config path/to/config.yml] [--pipeline pipeline-id] [--only lane-a,lane-b]
notarius pipelines list [--config path/to/config.yml] [--json]
2026-07-26 13:11:40 +00:00
~~~
Running Notarius without arguments, or with **help ** , * * --help**, or * * -h**,
writes the command summary to standard output and exits with status 0.
## run
~~~
2026-07-26 17:22:27 +00:00
notarius run <pipeline-id> --input path/to/source.json [--json] [flags]
2026-07-26 13:11:40 +00:00
~~~
The **run ** command executes the named pipeline for one input file. The
pipeline ID and * * --input** are required.
| Flag | Meaning |
| --- | --- |
| * * --config path** | Use this configuration file. When omitted, configuration discovery applies; see [Configuration ](config.md ). |
| * * --input path** | Source input file to process. Required. |
| * * --output-dir path** | Override the configured output root for this run. |
2026-07-26 17:22:27 +00:00
| * * --json** | Write the successful run-result receipt as JSON to standard output. |
2026-07-26 13:11:40 +00:00
| * * --chunk_cache auto\|bypass\|refresh** | Override chunk-plan cache handling for this run. |
| * * --resume** | Reuse compatible recorded checkpoints when checkpoint recording is enabled. |
| * * --recompute-step step-id** | With * * --resume**, recompute the selected ordered step and its dependent lanes. It cannot be combined with * * --only**. |
| * * --debug** | Retain a debug bundle for this run. |
| * * --debug-dir path** | Override the debug-bundle root. Requires * * --debug**. |
| * * --only lane-a,lane-b** | Run only the selected comma-separated artifact lanes when that selection is valid for the configured pipeline. |
| * * --llm-profile id** | Override effective LLM-capable module bindings with one configured profile. |
| * * --session-id id** | Supply a non-empty prompt session identifier to LLM-backed module calls. |
| * * --reference selector=path** | Add or replace a file reference binding. Repeatable. |
| * * --without-reference selector** | Remove a configured optional reference binding. Repeatable. |
**--chunk_cache** accepts only **auto ** , **bypass ** , or **refresh ** .
**--debug-dir**, * * --output-dir**, * * --session-id**, and
**--recompute-step** reject explicit empty values. * * --recompute-step**
requires * * --resume**; checkpoint requirements and reuse behavior are
documented in [Operations ](operations.md ).
### Reference selectors
Use * * --reference** only for a reference slot declared by the selected
configured target. The accepted selector forms are:
| Form | Target |
| --- | --- |
| slot=path | The unique selected target that declares slot. |
| chunk.slot=path | The chunker. |
| merge.slot=path | The unique selected merger that declares slot. |
| lane.slot=path | The unique extractor, merger, or normalizer in lane that declares slot. |
| lane.extract.slot=path | The extractor in lane. |
| lane.merge.slot=path | The merger in lane. |
| lane.normalize.slot=path | The normalizer in lane. |
**--without-reference** uses the same selector forms without =path. Slot
names, requiredness, and configured bindings are part of the
[configuration contract ](config.md ).
### Run output
2026-07-26 17:22:27 +00:00
Without * * --json**, standard output contains the completed pipeline ID, counts
of normalized and rejected outputs, and the output directory. A debug-enabled
run also prints its debug-bundle path to standard output. A successful run with
warnings reports the warning count to standard error. The published JSON bundle
is defined by the [JSON output contract ](integrations/json-output.md ).
With * * --json**, successful standard output is exactly one
`notarius.run-result.v1` JSON document followed by a newline, with no
human-oriented status or debug-path line. Its fields and compatibility policy
are defined by the [run-result contract ](integrations/run-result.md ). A caller
must check for exit status 0 before decoding this output; a failed write can
leave incomplete standard-output bytes that are not a result document.
2026-07-26 13:11:40 +00:00
Example:
~~~
OPENROUTER_API_KEY=your-api-key \
go run ./cmd/notarius run dnd-session \
--config examples/dnd-minimal.config.yml \
--input examples/seriatim-minimal-transcript.json
~~~
## config validate
~~~
notarius config validate [--config path/to/config.yml] [--pipeline pipeline-id] [--only lane-a,lane-b]
~~~
2026-07-04 03:01:38 +00:00
2026-07-26 13:11:40 +00:00
This command loads and validates a configuration. With * * --pipeline**, it also
resolves that pipeline against the production module catalog. * * --only** selects
lanes during that resolution and requires * * --pipeline**.
2026-07-04 03:01:38 +00:00
2026-07-26 13:11:40 +00:00
Success is written to standard output as either config "<path>" is valid or
config "<path>" is valid for pipeline "<pipeline-id>".
2026-07-04 03:01:38 +00:00
Examples:
2026-07-26 13:11:40 +00:00
~~~
2026-07-04 03:01:38 +00:00
go run ./cmd/notarius config validate \
2026-07-25 15:48:48 +00:00
--config examples/dnd-minimal.config.yml \
2026-07-26 13:11:40 +00:00
--pipeline dnd-session
2026-07-04 03:01:38 +00:00
2026-07-26 13:11:40 +00:00
OPENROUTER_API_KEY=validation-placeholder \
go run ./cmd/notarius config validate \
--config examples/dnd-complete.config.yml \
--pipeline dnd-session
~~~
2026-07-04 03:01:38 +00:00
2026-07-26 13:11:40 +00:00
The placeholder in the second command is sufficient only for offline
validation; it cannot run a provider-backed pipeline.
2026-07-04 03:01:38 +00:00
2026-07-26 13:11:40 +00:00
## pipelines list
2026-07-04 03:01:38 +00:00
2026-07-26 13:11:40 +00:00
~~~
notarius pipelines list [--config path/to/config.yml] [--json]
~~~
2026-07-04 03:01:38 +00:00
2026-07-26 13:11:40 +00:00
This command lists configured pipeline IDs in sorted order. By default, it
writes one ID per line to standard output. * * --json** writes an object shaped as
{"pipelines":[...]} instead.
2026-07-04 03:01:38 +00:00
2026-07-26 13:11:40 +00:00
~~~
2026-07-04 03:01:38 +00:00
go run ./cmd/notarius pipelines list \
2026-07-25 15:48:48 +00:00
--config examples/dnd-minimal.config.yml
2026-07-26 13:11:40 +00:00
~~~
2026-07-04 03:01:38 +00:00
2026-07-26 13:11:40 +00:00
## Output Streams And Exit Statuses
2026-07-04 03:01:38 +00:00
2026-07-26 13:11:40 +00:00
Successful commands write their primary result to standard output. Warnings and
errors are written to standard error.
2026-07-04 03:01:38 +00:00
2026-07-26 17:22:27 +00:00
For **run --json ** , warnings remain on standard error and standard output is a
machine-readable success result only. Syntax and runtime diagnostics remain on
standard error. Parse the result only after the process exits with status 0.
2026-07-26 13:11:40 +00:00
| Status | Meaning |
| --- | --- |
| 0 | The command completed successfully, including root help. |
| 1 | Command syntax was valid but configuration loading or validation, pipeline resolution or execution, provider use, output, or requested debug handling failed. |
| 2 | The command or flag syntax was invalid, including unknown commands, missing required arguments, invalid flag values, or invalid flag combinations. |
2026-07-04 03:01:38 +00:00
2026-07-26 13:11:40 +00:00
The root help spellings are the supported help path. Invoking * * --help** on
**run**, **config validate ** , or **pipelines list ** is handled by the flag
parser as a usage error: it writes an error to standard error and exits with
status 2.