Skip to main content

USAGE

Constant USAGE 

Source
const USAGE: &str = "Usage: cargo xtask codex-schema drift [--dir <path-to-codex-generate-json-schema-output-dir>] [--json] [--strict]

Diffs the vendored schema/methods.json + schema/CODEX_VERSION.txt against a
fresh `codex app-server generate-json-schema --out <dir> --experimental` dump
(or an existing dump directory passed via --dir) and reports added, removed,
and changed methods per section (client_requests, server_requests,
server_notifications, client_notifications).

  --dir <dir>  Diff against an already-generated dump directory instead of
               shelling out to `codex` to produce a fresh one. Makes the
               check testable/reusable in CI without requiring `codex` on
               PATH for the dump step itself.
  --json       Emit a machine-readable report instead of the human-readable
               one.
  --strict     Exit non-zero when drift is found. Without --strict, drift is
               still reported loudly but the command exits 0.

Missing `codex` on PATH (when --dir is not given) is never a hard failure:
the check prints \"skipped\" and exits 0, mirroring build.rs's staleness
check and tests/smoke.rs's live-integration test.";