Important
Unofficial downstream build. This repository is a Windows-focused fork of OpenAI Codex. It adds a configurable native Git Bash agent shell and is not an OpenAI-maintained distribution.
Chinese documentation | Git Bash launcher reference | Releases | Upstream Codex
- Open this repository's latest pre-release and download the asset named
codex-gitbash-windows-x64-*.zip. - Extract the archive anywhere you control.
- From Git Bash, run the included launcher:
./codex-gitbash.shThe launcher starts the bundled Windows executable with:
[windows]
agent_shell = "git-bash"It intentionally uses Git Bash for Codex's agent commands while retaining the
same user state as the official CLI (~/.codex): sign-in, configuration,
plugins, skills, hooks, and MCP settings are shared.
For a local source checkout, run this from repository root:
./bin/codex-gitbash.shTo start with Codex's approval and sandbox bypass flag:
./codex-gitbash.sh --dangerously-bypass-approvals-and-sandboxDocumentation only - no automatic configuration. Neither this repository nor
codex-gitbash.shcreates an alias or writes to~/.bashrc.
In an already open Git Bash window, you may manually create an alias for a local checkout. Replace the placeholder with the absolute checkout path:
alias codex='/absolute/path/to/codex/bin/codex-gitbash.sh'After you manually run it, start the Git Bash build with:
codex
# or
codex --dangerously-bypass-approvals-and-sandboxThe alias affects only that one Git Bash window and disappears when it closes. To remove it earlier without changing files, run:
unalias codexThe Chinese documentation contains the exact local command
for the maintained build machine and an optional, manual ~/.bashrc tutorial.
Do not start
codex-gitbash.exedirectly: usecodex-gitbash.shso the Git Bash shell setting is always supplied.
- Adds the
windows.agent_shell = "git-bash"configuration option. - Detects and launches Git Bash as the Windows agent shell.
- Provides
codex-gitbash.sh, a safe launcher that enables the setting for one invocation without replacing the npm-installedcodexcommand. - Automatically rebases the reviewed patch on the current upstream
main, builds a Windows x64 executable, and publishes a pre-release when upstream changes.
The source remains an OpenAI Codex derivative under the repository's existing
Apache-2.0 license. This fork's Git Bash-specific changes live on
its main branch and are documented in the release metadata.
The Build Codex Git Bash for Windows workflow checks upstream daily at 03:17 UTC (11:17 China Standard Time) and skips the expensive Rust build when there is no new upstream commit. You can also run it manually from the Actions tab. A changed upstream revision requires a fresh Windows/MSVC compile; the workflow caches Rust dependencies and build artifacts to speed up later runs.
For the official product, account, IDE, API, authentication, and general CLI documentation, use the upstream resources: