English | 简体中文
A Git marketplace for codex-git-bash-shell, a Codex plugin that helps Windows Codex Desktop
agents start in Git Bash instead of the native Windows PowerShell shell.
This is an unofficial community project. It is not affiliated with, endorsed by, or sponsored by OpenAI.
This repository packages a maintenance plugin, not a replacement for Codex Desktop. The plugin
builds a patched codex.exe, configures Desktop to start that patched CLI through
CODEX_CLI_PATH, writes [windows].shell_path in ~/.codex/config.toml, and updates the Windows
shell tool description so new Codex sessions no longer describe the command tool as PowerShell-only.
For most users, give this repository URL to Codex and ask it to install the plugin:
Install this Codex plugin and configure Git Bash using the release binary:
https://github.com/yizhiakuya/codex-git-bash
Codex can then run the normal plugin install commands:
codex plugin marketplace add https://github.com/yizhiakuya/codex-git-bash --ref main
codex plugin add codex-git-bash-shell@codex-git-bashAfter that, start a new Codex thread and ask:
Use codex-git-bash-shell to repair my Codex Git Bash shell setup.
The plugin defaults to the recommended release-binary install path, so users do not need to build Codex locally. Restart Codex Desktop and open a new thread after installation.
Prebuilt release assets are published at:
https://github.com/yizhiakuya/codex-git-bash/releases
This is a community workaround for Windows shell selection. It is useful while upstream Codex does
not expose a stable built-in windows.shell_path setting.
Related upstream discussion:
If upstream Codex later ships this feature, prefer the official implementation.
Project code and documentation are released under the MIT license unless otherwise noted. The bundled patch targets OpenAI Codex source code and follows the upstream Apache-2.0 notice requirements. See NOTICE, THIRD_PARTY_NOTICES.md, and LICENSES/Apache-2.0.txt.
codex plugin marketplace add https://github.com/yizhiakuya/codex-git-bash --ref main
codex plugin add codex-git-bash-shell@codex-git-bashThe marketplace manifest lives at:
.agents/plugins/marketplace.json
After installing the plugin, start a new Codex thread and ask:
Use codex-git-bash-shell to repair my Codex Git Bash shell setup.
The skill will guide Codex to run the bundled scripts. The recommended path uses
-UseReleaseBinary, which downloads the latest codex-git-bash-windows-x86_64.zip release asset
instead of building from source.
You can also run the scripts directly from the installed plugin cache or from this repository:
powershell -NoProfile -ExecutionPolicy Bypass -File .\plugins\codex-git-bash-shell\scripts\install.ps1 -UseReleaseBinary
powershell -NoProfile -ExecutionPolicy Bypass -File .\plugins\codex-git-bash-shell\scripts\verify.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File .\plugins\codex-git-bash-shell\scripts\rollback.ps1Print script help:
powershell -NoProfile -ExecutionPolicy Bypass -File .\plugins\codex-git-bash-shell\scripts\install.ps1 -HelpRecommended release-binary install:
powershell -NoProfile -ExecutionPolicy Bypass -File .\plugins\codex-git-bash-shell\scripts\install.ps1 -UseReleaseBinarySource-build install:
powershell -NoProfile -ExecutionPolicy Bypass -File .\plugins\codex-git-bash-shell\scripts\install.ps1install.ps1:
- Finds Git Bash from
-BashPath,CODEX_GIT_BASH_PATH, common Git for Windows paths, orPATH. - Installs Git for Windows with
winget install Git.Gitif Git Bash is missing, unless-SkipGitInstallis used. - With
-UseReleaseBinary, downloadscodex-git-bash-windows-x86_64.zipfrom GitHub Releases, verifiesSHA256SUMS.txt, and copies the patched executable to~/.codex/bin/codex-git-bash/codex.exe. - Without
-UseReleaseBinary, cloneshttps://github.com/openai/codex.gitinto~/.codex/codex-git-bash-shell/sources/unless-SourceDiris provided. - Applies
plugins/codex-git-bash-shell/patches/codex-windows-shell-path.patch. - Optionally runs targeted tests with
-RunTests. - Builds
codex-cliand copies the patched executable to~/.codex/bin/codex-git-bash/codex.exe. - Updates the Windows shell command tool description to mention the active default shell and include Git Bash examples.
- Sets user
CODEX_CLI_PATHto the patched executable. - Updates
~/.codex/config.toml:
[windows]
shell_path = "C:\\Program Files\\Git\\bin\\bash.exe"
[mcp_servers.node_repl.env]
CODEX_CLI_PATH = "C:\\Users\\you\\.codex\\bin\\codex-git-bash\\codex.exe"- Stores backups and state under
~/.codex/codex-git-bash-shell/.
The script does not modify the WindowsApps Codex installation.
- Windows Codex Desktop
- PowerShell
- Git for Windows, or
wingetso the installer can install it.winget --silentmay still show a Windows prompt or require admin rights depending on the machine policy. - Network access for GitHub Releases when using
-UseReleaseBinary. - Rust/Cargo toolchain capable of building Codex CLI when building from source. The installer first
tries the pinned
1.95-x86_64-pc-windows-msvctoolchain and falls back to the default Cargo toolchain. - Network access for cloning Codex source unless
-SourceDiris used when building from source.
Release binaries are unofficial community builds and are currently unsigned, so Windows SmartScreen
may warn before first use. Each release includes SHA256SUMS.txt and BUILD_INFO.json.
powershell -NoProfile -ExecutionPolicy Bypass -File .\plugins\codex-git-bash-shell\scripts\verify.ps1Healthy output should show:
- patched
codex.exeexists - user
CODEX_CLI_PATHpoints at the patched CLI [windows].shell_pathis set- Git Bash starts successfully
Restart Codex Desktop and open a new thread after install or rollback. Existing threads may keep an old app-server process.
Refresh the marketplace and reinstall the plugin:
codex plugin marketplace upgrade codex-git-bash
codex plugin add codex-git-bash-shell@codex-git-bashThen run the installer again:
powershell -NoProfile -ExecutionPolicy Bypass -File .\plugins\codex-git-bash-shell\scripts\install.ps1 -UseReleaseBinarypowershell -NoProfile -ExecutionPolicy Bypass -File .\plugins\codex-git-bash-shell\scripts\rollback.ps1Rollback restores or removes user CODEX_CLI_PATH, removes the config keys added by install, and
leaves the built patched CLI on disk unless -RemoveBuiltCli is used.
.agents/plugins/marketplace.json
plugins/codex-git-bash-shell/
.codex-plugin/plugin.json
skills/codex-git-bash-shell/SKILL.md
scripts/
patches/codex-windows-shell-path.patch
- Review the patch before running install.
- The installer edits user-level environment variables and
~/.codex/config.toml. - The installer creates backups under
~/.codex/codex-git-bash-shell/backups/. - This is a local maintenance tool. It is not an official OpenAI plugin.
- The bundled patch targets OpenAI Codex source code, which is licensed under Apache-2.0. See THIRD_PARTY_NOTICES.md, NOTICE, and LICENSES/Apache-2.0.txt.