Autostage (git add) and commit changes using Semantic Commit format for fully automated workflows where Codex owns the full change set and the user should not manually stage files.
Prereqs:
git available on PATH.semantic-commit available on PATH (install via brew install nils-cli).git-scope is optional; default summary mode falls back to git show when unavailable.Inputs:
git add).--message, --message-file, or stdin (--automation disables stdin fallback).--repo <path>.Outputs:
git add (-A or -u).semantic-commit staged-context: staged diff context for message generation.semantic-commit commit: validation result and commit summary (unless disabled).--message-out <path>Exit codes:
0: success (including validate-only and dry-run checks).1: usage/operational failure (git add/git commit/hook/conflict/repo issues).2: no changes to stage/commit.3: commit message missing/empty.4: commit message validation failed.5: required dependency missing (for example, git).Failure modes:
git add -A may stage unintended files.git add failure (pathspec/permission/submodule state).exit 2).exit 3).exit 4).git commit failure (exit 1).semantic-commit (non-autostage).git add -Agit add -usemantic-commit staged-context [--format <bundle|json|patch>] [--json] [--repo <path>]semantic-commit commit [--message <text>|--message-file <path>] [options]--automation, --validate-only, --dry-run, --message-out, --summary, --no-summary, --repo, --no-progress,
--quietRules:
git add -A by default; use git add -u only when untracked files must stay uncommitted.semantic-commit staged-context output only.--automation with --message or --message-file.Recommended flow:
git add -A or git add -u) and run it.semantic-commit staged-context --format bundle.semantic-commit commit --validate-only ....semantic-commit commit --dry-run ....semantic-commit commit ... for the real commit.Use one of:
type(scope): subjecttype: subjectRules:
<= 100 characters.- bullets with uppercase first letter.<= 100 characters.exit 2: autostage produced no commitable delta.exit 3: missing/empty message (common with --automation + no --message).exit 4: semantic format validation failed.exit 1: operational failure (git add/git commit/hook conflict); report stderr verbatim.git-scope warning only: fallback to git show is expected behavior.