codex-commit 0.2.2

Commit Git changes with Codex Luna at Max reasoning, with optional push
codex-commit-0.2.2 is not a library.

codex-commit

CI crates.io

One command to inspect and commit your existing Git changes with GPT-6 Luna at Max reasoning. Add --push to push afterward. A small Rust executable that launches Codex CLI with direct terminal output and normal signal handling.

codex-commit

Each run creates a saved Codex CLI session. The Rust executable has no third-party Rust dependencies and supports macOS and Linux.

Install

All installation methods require Git and Codex CLI with access to gpt-6-luna. Authenticate with codex login and configure your Git identity first. A remote and push credentials are needed only with --push. Tested with Codex CLI 0.164.0.

Homebrew on macOS

brew tap syz51/tap
brew trust --formula syz51/tap/codex-commit
brew install syz51/tap/codex-commit

Homebrew 7 requires explicit trust for third-party formulae. Omit the trust line on older versions that do not provide brew trust; this command trusts only codex-commit.

The tap selects the prebuilt Apple Silicon or Intel executable for your Mac. It uses the Git already available on PATH, including macOS Command Line Tools Git, without requiring Homebrew's Git package. The command checks for Git when it runs and reports an error if it is missing. Install Codex CLI separately. Upgrade with brew upgrade syz51/tap/codex-commit.

Cargo

With Rust 1.85 or newer installed:

cargo install codex-commit --locked

Cargo compiles the published source for your machine and normally installs into ~/.cargo/bin. Run the command again to install a newer published version. No Rust installation is needed for the Homebrew or prebuilt downloads.

Prebuilt macOS downloads

Download the matching archive and SHA256SUMS from v0.2.2:

Mac Archive
Apple Silicon (M-series) codex-commit-v0.2.2-aarch64-apple-darwin.tar.gz
Intel codex-commit-v0.2.2-x86_64-apple-darwin.tar.gz

For example, on Apple Silicon:

release=https://github.com/syz51/codex-commit/releases/download/v0.2.2
archive=codex-commit-v0.2.2-aarch64-apple-darwin.tar.gz
curl -fLO "$release/$archive"
curl -fLO "$release/SHA256SUMS"
grep "  $archive\$" SHA256SUMS | shasum -a 256 -c -
tar -xzf "$archive"
mkdir -p ~/.local/bin
install -m 755 codex-commit ~/.local/bin/codex-commit

Use the Intel archive name instead on an Intel Mac. Make sure your installation directory is on PATH. Releases include checksums, and published release assets are immutable.

From source

git clone https://github.com/syz51/codex-commit.git
cd codex-commit
cargo install --path . --locked

Alternatively, make install builds a release executable and installs into ~/.local/bin. PREFIX and DESTDIR are supported for custom locations and packaging. No Codex or shell configuration is changed.

Use

codex-commit                              # commit in the current repository
codex-commit --push                       # commit, then push
codex-commit -C ~/project                 # another repository
codex-commit 'Commit only the README change'
codex-commit --dry-run                    # inspect the prompt without running Codex
codex-commit --interactive                # interactive Codex with approval prompts
codex-commit 2>&1 | tee codex-commit.log   # capture progress and final output

Options precede optional instructions. Use -- before instructions beginning with a dash. The command runs from the repository root, including when invoked in a subdirectory. Bare repositories and detached HEADs are rejected.

The default mode runs unattended and exits when Codex finishes. It grants Codex full local command access so it can update Git metadata. Run it only in repositories you trust. --interactive instead uses the workspace-write sandbox and Codex permission prompts; its terminal stays open for follow-up messages. Both modes explicitly select the normal service tier, without enabling Fast mode.

The task asks Codex to inspect staged, unstaged, and untracked changes; follow repository instructions; run relevant checks; and commit existing intended changes without rewriting history. By default its final policy forbids pushing, publishing, fetching, or pulling, even when repository or additional instructions mention pushing. Rerun with --push to enable pushing.

With --push, Codex can push existing local commits from a clean worktree. With no upstream, it may set one only when origin is the sole remote. Both push modes are prompt policies, not OS-enforced network or Git restrictions; review the streamed output.

Progress streams directly to stderr, and the final response goes to stdout in unattended mode. Ctrl-C interrupts Codex. The Rust process replaces itself with Codex on Unix, preserving terminal streams, process identity, and exit status. Cancellation cannot undo an operation that already completed; inspect local and remote state before retrying.

Use the session ID printed by Codex to continue a run interactively:

codex resume --include-non-interactive SESSION_ID

For the underlying contracts, see the official Luna model documentation and Codex non-interactive mode documentation.

Development

make check  # rustfmt and Clippy
make test   # Rust workspace unit, integration, terminal, and packaging tests

Development and release tooling use the pinned Rust 1.99.1 toolchain. Runtime code has no third-party Rust dependencies; tests and the private xtask release helper use development dependencies recorded in Cargo.lock. Run cargo test --workspace --locked directly if you do not use Make.

CI tests native Linux, Apple Silicon macOS, and Intel macOS, including installation. Automated Rust tests use a mock Codex executable, real disposable Git repositories, and real terminal signals; they do not call a model or require credentials. Release builds execute and check each native Mac binary before packaging with cargo xtask.

See CONTRIBUTING.md, release procedures, CHANGELOG.md, and SECURITY.md.

MIT licensed. Not affiliated with OpenAI.