Skip to content

zlinwzx147258/codex-gitbash

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8,333 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codex Git Bash for Windows

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

Run Codex natively through Git Bash

  1. Open this repository's latest pre-release and download the asset named codex-gitbash-windows-x64-*.zip.
  2. Extract the archive anywhere you control.
  3. From Git Bash, run the included launcher:
./codex-gitbash.sh

The 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.sh

To start with Codex's approval and sandbox bypass flag:

./codex-gitbash.sh --dangerously-bypass-approvals-and-sandbox

Manual codex alias tutorial

Documentation only - no automatic configuration. Neither this repository nor codex-gitbash.sh creates 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-sandbox

The alias affects only that one Git Bash window and disappears when it closes. To remove it earlier without changing files, run:

unalias codex

The Chinese documentation contains the exact local command for the maintained build machine and an optional, manual ~/.bashrc tutorial.

Do not start codex-gitbash.exe directly: use codex-gitbash.sh so the Git Bash shell setting is always supplied.

What this fork changes

  • 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-installed codex command.
  • 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.

Automatic upstream builds

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.

Upstream Codex documentation

For the official product, account, IDE, API, authentication, and general CLI documentation, use the upstream resources:

About

Unofficial Windows Git Bash build of OpenAI Codex CLI with automated upstream releases.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages