English runbook for euni command usage in local development and CI, including exit-code and UG-code troubleshooting.
Operational playbook for excel-unidiff-cli (euni).
Goal: decide quickly which command to run, in what order, and how to interpret results.
euni init-policy
.euni.yml template in --repo.euni check
euni apply
git config --local only.--dry-run before writing.--repair-unicode-deletes to restore staged/worktree deleted tracked paths in core.precomposeunicode=false mode.worktree-only delete is restored with git restore --worktree).euni doctor
check + scan-like Unicode analysis).euni scan
euni version
euni <version> (<commit>).help command.--recursive default is false (root repo only).apply and init-policy.scan does not accept --policy.version accepts no options.--format is text or json only.euni init-policy --repo .
euni check --repo . --recursive --policy ./.euni.yml
euni apply --repo . --recursive --policy ./.euni.yml --dry-run
euni apply --repo . --recursive --policy ./.euni.yml
euni check --repo . --recursive --policy ./.euni.yml
euni apply --repo . --recursive --policy ./.euni.yml --repair-unicode-deletes
euni doctor --repo . --recursive --policy ./.euni.yml
euni scan --repo . --recursive --format json
euni check \
--repo . \
--recursive \
--policy ./.euni.yml \
--non-interactive \
--format json > euni-report.json
Gate expectations:
schema/euni-report.schema.json.report.exitCode.exit 1 as findings (operational failure), exit 2 as execution/runtime failure.euni-report.json as artifact.JSON contract:
stdout: exactly one JSON object.stderr: logs/progress/error details.0: no findings, no errors.1: findings present.2: execution error.Precedence: if any execution error exists, exit is 2.
Common findings (exit 1):
UG004: config drift detected.UG005: NFC collision detected.UG011: combining mark in path.UG012: non-standard FS entry (symlink/reparse/mount).UG013: ambiguous policy path key (case-only collision).UG014: unicode delete repair signal (dry-run plan or runtime safety skip).Common execution errors (exit 2):
UG001: invalid/inaccessible --repo.UG002: git command/runtime failure.UG003: policy load failure.UG006: submodule uninitialized/inaccessible.UG007: invalid policy structure/unsupported keys.UG008: .euni.yml exists without --force.UG009: unsupported command/option usage.UG010: gitdir/top-level outside --repo boundary.When running via go run, non-zero app exits may appear as process exit 1 (Go tool wrapper behavior).
For strict 0/1/2 contract checks, build and run the binary directly:
go build -o ./bin/euni ./cmd/euni
./bin/euni check --repo . --policy ./.euni.yml
echo $?