•
3 min read

Headless CLI

Table of Contents

norn review runs the review pipeline without a graphical or terminal UI. It prints Markdown by default and supports JSON output for automation.

Diff-sharing authorization

A non-empty headless review sends its selected diff and review instructions to the configured AI provider only after explicit authorization. Grant consent for one command with --allow-provider-diff, or persist and revoke your local choice with:

norn setup --allow-provider-diff --yes
norn setup --deny-provider-diff --yes

This authorization never grants a coding agent permission to bypass its host sandbox. Agent-triggered review should run the exact norn review command with narrowly scoped outside-sandbox permission.

Review scopes

Working tree

Review staged, unstaged, and eligible untracked text files:

norn review --repo-path . --scope working-tree --allow-provider-diff

Potentially sensitive untracked files—such as environment, credential, and private-key material—are skipped with a warning.

Branch

Review committed changes from the merge base through HEAD:

norn review --repo-path . --scope branch --allow-provider-diff

Override the destination when necessary:

norn review --repo-path . --scope branch --base origin/main \
  --allow-provider-diff

Uncommitted changes are not included in branch scope. Run a separate working-tree review when both kinds of changes exist.

Pull request

Review a provider-hosted pull request:

norn review \
  --scope pr \
  --provider github \
  --workspace delaudio \
  --repo norn \
  --pr 198 \
  --allow-provider-diff

--workspace and --repo must be supplied together and must match the selected local checkout when one is used.

Provider and model

Select Claude or Codex explicitly:

norn review --repo-path . --scope branch --ai-provider codex \
  --allow-provider-diff

Use --model and --effort to override configured defaults for one run.

Output and exit behavior

Write structured JSON to stdout:

norn review --repo-path . --scope branch --format json --allow-provider-diff

Write the result to a file:

norn review --repo-path . --scope branch --output norn-review.md \
  --allow-provider-diff

By default, findings do not fail the process. Turn the command into a gate with:

norn review \
  --repo-path . \
  --scope branch \
  --fail-on-findings \
  --min-severity high \
  --allow-provider-diff

Profiles and analyzers

Select a repository profile with --profile <name>. Local analyzers are skipped by default; opt in for a standalone review with --run-analyzers. Required organization-policy analyzers can still run automatically.

norn review \
  --repo-path . \
  --scope working-tree \
  --profile frontend-strict \
  --run-analyzers \
  --allow-provider-diff

Headless review never publishes comments to the remote pull request.

Provider execution is bounded. JSON failures distinguish missing consent (review.diffConsentRequired), known sandbox restrictions (review.sandboxRestricted), and provider timeouts (review.providerTimeout) without including diff content or credentials.