# Audita CLI Reference ## Shortest Useful Command ```sh audita process --glossary --output ``` This command validates input files, runs the configured correction pipeline, and writes corrected transcript JSON. ## Command Overview - `audita process`: process one transcript JSON file. - `audita config validate`: validate a versioned YAML config file. - `audita config print-effective`: print redacted effective config JSON. General help: ```sh audita --help audita process --help audita config --help ``` ## `process` Usage: ```sh audita process [flags] ``` Input requirements: - exactly one transcript JSON positional argument is required; - `--glossary ` is required. Config path selection for `process`: 1. `--config ` 2. `AUDITA_CONFIG` 3. `/usr/local/etc/audita/config.yml` (if present) 4. `/etc/audita/config.yml` (if present) For precedence and full config schema, see [`docs/config.md`](config.md). ### `process` Flag Reference Core I/O flags: - `--config `: path to versioned YAML config file. - `--glossary `: glossary YAML input path (required). - `--output `: corrected transcript JSON output file path. - `--report-json `: machine-readable report JSON output path. - `--output-schema `: output schema key (`bare-segments` or `audita-v1`). - `--modules `: comma-separated module sequence override. Primary LLM flags: - `--llm-api-key `: primary LLM API key. - `--model `: primary LLM model name. - `--base-url `: primary OpenAI-compatible base URL. - `--llm-timeout-seconds `: primary timeout in seconds. - `--max-retries `: primary structured-output retries. Validation LLM flags: - `--validation-llm-api-key `: validation LLM API key. - `--validation-model `: validation LLM model name. - `--validation-base-url `: validation OpenAI-compatible base URL. - `--validation-llm-timeout-seconds `: validation timeout in seconds. - `--validation-max-retries `: validation structured-output retries. - `--validation-max-prompt-tokens `: validation max prompt tokens. Concurrency flags: - `--total-llm-concurrency `: total concurrent proposal+validation LLM calls. - `--proposal-llm-concurrency `: concurrent proposal-generation LLM calls. - `--validation-llm-concurrency `: concurrent validation LLM calls. - `--llm-concurrency `: alias for `--total-llm-concurrency`. Chunking and normalization flags: - `--target-sections `: target number of transcript sections. - `--max-section-tokens `: maximum section tokens. - `--min-section-tokens `: minimum section tokens. - `--normalize-max-segment-gap `: maximum same-speaker merge gap. - `--normalize-ellipsis-gap `: gap threshold for ellipsis insertion. - `--normalize-max-segment-duration `: maximum merged segment duration. - `--normalize-max-segment-tokens `: maximum merged segment token estimate. Threshold flags: - `--glossary-confidence-threshold ` - `--homophones-confidence-threshold ` - `--spoken-word-confidence-threshold ` - `--grammar-confidence-threshold ` Context and diagnostics flags: - `--transcript-description `: background context for prompts; does not override transcript content. - `--work-dir `: per-run diagnostics work directory. - `--work-dir-retention `: run-directory retention policy. ### `process` Output and Exit Behavior - With `--output`: stdout is expected to be empty on success. - Without `--output`: stdout contains transcript JSON only on success. - `--report-json` writes a file and is never printed to stdout. - Stderr is human-readable diagnostics/errors. - On failures after diagnostics initialization, stderr includes the diagnostics directory path. Exit behavior: - `0`: success. - `1`: runtime failure during processing/reporting/output paths. - `2`: CLI usage or configuration input error. Integration references: - subprocess contract: [`docs/integrations/subprocess.md`](integrations/subprocess.md) - transcript/glossary file contract: [`docs/integrations/transcript-glossary-files.md`](integrations/transcript-glossary-files.md) ### `process` Examples Write corrected transcript to a file: ```sh audita process transcript.json \ --glossary glossary.yaml \ --output corrected.json ``` Emit transcript JSON to stdout: ```sh audita process transcript.json --glossary glossary.yaml ``` Use explicit config and write report JSON: ```sh audita process transcript.json \ --glossary glossary.yaml \ --config audita.yml \ --output corrected.json \ --report-json report.json ``` Override the module sequence: ```sh audita process transcript.json \ --glossary glossary.yaml \ --modules glossary,homophones,grammar \ --output corrected.json ``` ## `config validate` Usage: ```sh audita config validate --config ``` Behavior: - validates defaults merged with file config; - does not apply environment overrides; - prints `config is valid` on success. Errors: - `--config` is required; - positional arguments are rejected; - validation failures are printed to stderr. ## `config print-effective` Usage: ```sh audita config print-effective [--config ] ``` Config path selection: 1. `--config ` when provided 2. `AUDITA_CONFIG` 3. `/usr/local/etc/audita/config.yml` (if present) 4. `/etc/audita/config.yml` (if present) Behavior: - merges defaults, optional config file, and environment overrides; - prints redacted JSON to stdout. Errors: - positional arguments are rejected; - resolution or parse failures are printed to stderr.