Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .codespellignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ psuedo
SOM
te
TE
WRONLY
oint
1 change: 0 additions & 1 deletion .github/scripts/verify_cargo_workspace_manifests.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"path-utils": "codex-utils-path",
}
MANIFEST_FEATURE_EXCEPTIONS = {
"codex-rs/code-mode/Cargo.toml": {"sandbox": ("v8/v8_enable_sandbox",)},
"codex-rs/v8-poc/Cargo.toml": {"sandbox": ("v8/v8_enable_sandbox",)},
}
OPTIONAL_DEPENDENCY_EXCEPTIONS = set()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codefx-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with: {persist-credentials: false}
with: { persist-credentials: false }
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with: {python-version: '3.12'}
with: { python-version: "3.12" }
- name: Shell transaction checks
if: runner.os != 'Windows'
shell: bash
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/codefx-native-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,39 @@ name: Codefx native package
on:
workflow_call:
inputs:
tag: {type: string, required: true}
target: {type: string, required: true}
runner: {type: string, required: true}
reuse_only: {type: boolean, required: false, default: false}
tag: { type: string, required: true }
target: { type: string, required: true }
runner: { type: string, required: true }
reuse_only: { type: boolean, required: false, default: false }
permissions:
contents: read
jobs:
build:
runs-on: ${{ inputs.runner }}
timeout-minutes: 180
permissions: {contents: read, actions: read}
permissions: { contents: read, actions: read }
outputs:
artifact_id: ${{ steps.upload.outputs.artifact-id }}
env:
TARGET: ${{ inputs.target }}
RELEASE_TAG: ${{ inputs.tag }}
REUSE_ONLY: ${{ inputs.reuse_only }}
CARGO_BUILD_JOBS: '2'
CARGO_PROFILE_RELEASE_DEBUG: '0'
CARGO_PROFILE_RELEASE_LTO: 'false'
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: '16'
CARGO_NET_GIT_FETCH_WITH_CLI: 'true'
AWS_LC_SYS_NO_JITTER_ENTROPY: '1'
CARGO_BUILD_JOBS: "2"
CARGO_PROFILE_RELEASE_DEBUG: "0"
CARGO_PROFILE_RELEASE_LTO: "false"
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "16"
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
AWS_LC_SYS_NO_JITTER_ENTROPY: "1"
CODEX_REPO_ROOT: ${{ github.workspace }}
GH_TOKEN: ${{ github.token }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with: {persist-credentials: false}
with: { persist-credentials: false }
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with: {python-version: '3.12'}
with: { python-version: "3.12" }
- name: Preserve release helper and validate input
run: |
set -euo pipefail
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- uses: dtolnay/rust-toolchain@d124f86f28ff42855784ff3319f48ac182c248f8
if: steps.prepare.outputs.reuse != 'true'
with:
toolchain: '1.99.1'
toolchain: "1.99.1"
targets: ${{ inputs.target }}
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7
if: steps.prepare.outputs.reuse != 'true'
Expand All @@ -90,7 +90,7 @@ jobs:
restore-keys: codefx-native-${{ inputs.target }}-v1-
- uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29
if: runner.os == 'Linux' && steps.prepare.outputs.reuse != 'true'
with: {version: 0.14.0, use-cache: false}
with: { version: 0.14.0, use-cache: false }
- name: Prepare Linux native dependencies
if: runner.os == 'Linux' && steps.prepare.outputs.reuse != 'true'
run: bash .github/scripts/install-musl-build-tools.sh
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
publish:
needs: build
runs-on: ubuntu-24.04
permissions: {contents: write, actions: write}
permissions: { contents: write, actions: write }
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ inputs.tag }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/codefx-native-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Codefx native installation smoke
on:
workflow_dispatch:
inputs:
tag: {type: string, required: true, default: rust-v0.164.0}
targets: {type: string, required: false, default: all}
tag: { type: string, required: true, default: rust-v0.165.0 }
targets: { type: string, required: false, default: all }
workflow_call:
inputs:
tag: {type: string, required: true}
targets: {type: string, required: false, default: all}
tag: { type: string, required: true }
targets: { type: string, required: false, default: all }
permissions:
contents: read
jobs:
Expand Down Expand Up @@ -55,10 +55,10 @@ jobs:
CODEFX_GITHUB_REPO: hitmux/codefx
CODEFX_INSTALL_REF: ${{ github.sha }}
CODEFX_GITHUB_TOKEN: ${{ github.token }}
CODEX_NON_INTERACTIVE: '1'
CODEX_NON_INTERACTIVE: "1"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with: {persist-credentials: false}
with: { persist-credentials: false }
- name: Install published package through the public bootstrap
if: runner.os != 'Windows'
shell: bash
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/codefx-platform-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
tag:
type: string
required: true
default: rust-v0.164.0
default: rust-v0.165.0
reuse_only:
type: boolean
required: false
Expand All @@ -18,7 +18,7 @@ concurrency:
jobs:
prepare:
runs-on: ubuntu-24.04
permissions: {contents: read, actions: write}
permissions: { contents: read, actions: write }
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ inputs.tag }}
Expand All @@ -29,7 +29,7 @@ jobs:
set -euo pipefail
[[ "$RELEASE_TAG" =~ ^rust-v[0-9]+\.[0-9]+\.[0-9]+$ ]]
gh release view "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" --json tagName
if [[ "$RELEASE_TAG" == rust-v0.164.0 ]]; then
if [[ "$RELEASE_TAG" == rust-v0.165.0 ]]; then
published="$(gh api "repos/$GITHUB_REPOSITORY/releases/tags/$RELEASE_TAG" --jq '.assets[] | select(.name == "codex-package-x86_64-unknown-linux-musl.tar.gz") | .digest')"
if [[ "$published" == sha256:747ff33ad0eb3aaced08fe8308b00be772cac671740e9918ec1eaf1be37b9e67 ]]; then
for artifact in $(gh api --paginate "repos/$GITHUB_REPOSITORY/actions/artifacts" --jq '.artifacts[] | select(.name == "verified-codefx-linux" and .workflow_run.id == 40147229358) | .id'); do
Expand All @@ -40,18 +40,18 @@ jobs:
platforms:
needs: prepare
if: github.repository == 'hitmux/codefx'
permissions: {contents: write, actions: write}
permissions: { contents: write, actions: write }
strategy:
fail-fast: false
max-parallel: 2
matrix:
include:
- {runner: ubuntu-24.04, target: x86_64-unknown-linux-musl}
- {runner: macos-15, target: aarch64-apple-darwin}
- {runner: windows-2025, target: x86_64-pc-windows-msvc}
- {runner: ubuntu-24.04-arm, target: aarch64-unknown-linux-musl}
- {runner: macos-15-intel, target: x86_64-apple-darwin}
- {runner: windows-11-arm, target: aarch64-pc-windows-msvc}
- { runner: ubuntu-24.04, target: x86_64-unknown-linux-musl }
- { runner: macos-15, target: aarch64-apple-darwin }
- { runner: windows-2025, target: x86_64-pc-windows-msvc }
- { runner: ubuntu-24.04-arm, target: aarch64-unknown-linux-musl }
- { runner: macos-15-intel, target: x86_64-apple-darwin }
- { runner: windows-11-arm, target: aarch64-pc-windows-msvc }
uses: ./.github/workflows/codefx-native-package.yml
with:
tag: ${{ inputs.tag }}
Expand All @@ -61,7 +61,7 @@ jobs:
manifest:
needs: platforms
runs-on: ubuntu-24.04
permissions: {contents: write}
permissions: { contents: write }
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ inputs.tag }}
Expand Down Expand Up @@ -89,13 +89,13 @@ jobs:
installers:
needs: smoke
runs-on: ubuntu-24.04
permissions: {contents: write}
permissions: { contents: write }
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ inputs.tag }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with: {persist-credentials: false}
with: { persist-credentials: false }
- name: Publish immutable installer bundle after all native checks pass
shell: bash
run: |
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/codefx-publish-verified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@ name: Codefx publish verified native artifact
on:
workflow_dispatch:
inputs:
source_run: {type: string, required: true, default: '40152919968'}
tag: {type: string, required: true, default: rust-v0.164.0}
source_run: { type: string, required: true, default: "40152919968" }
tag: { type: string, required: true, default: rust-v0.165.0 }
target:
type: choice
required: true
options: [x86_64-pc-windows-msvc, aarch64-pc-windows-msvc, x86_64-unknown-linux-musl, aarch64-unknown-linux-musl, aarch64-apple-darwin, x86_64-apple-darwin]
options:
[
x86_64-pc-windows-msvc,
aarch64-pc-windows-msvc,
x86_64-unknown-linux-musl,
aarch64-unknown-linux-musl,
aarch64-apple-darwin,
x86_64-apple-darwin,
]
permissions:
contents: write
actions: write
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/codefx-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
description: Existing Codefx release tag
type: string
required: true
default: rust-v0.164.0
default: rust-v0.165.0

permissions:
contents: read
Expand All @@ -24,12 +24,12 @@ jobs:
timeout-minutes: 120
env:
TARGET: x86_64-unknown-linux-musl
CARGO_BUILD_JOBS: '2'
CARGO_PROFILE_RELEASE_DEBUG: '0'
CARGO_PROFILE_RELEASE_LTO: 'false'
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: '16'
CARGO_NET_GIT_FETCH_WITH_CLI: 'true'
AWS_LC_SYS_NO_JITTER_ENTROPY: '1'
CARGO_BUILD_JOBS: "2"
CARGO_PROFILE_RELEASE_DEBUG: "0"
CARGO_PROFILE_RELEASE_LTO: "false"
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "16"
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
AWS_LC_SYS_NO_JITTER_ENTROPY: "1"
CODEX_REPO_ROOT: ${{ github.workspace }}
RELEASE_TAG: ${{ inputs.tag }}
steps:
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center"><strong>Codefx CLI</strong> is a fork of OpenAI Codex CLI with resilient retries and Codefx release updates.
<p align="center">
<img src="https://github.com/caokai674/codefx/blob/main/.github/codex-cli-splash.png" alt="Codex CLI splash" width="80%" />
<img src="https://github.com/hitmux/codefx/blob/main/.github/codex-cli-splash.png" alt="Codex CLI splash" width="80%" />
</p>
</br>
If you want Codex in your code editor (VS Code, Cursor, Windsurf), <a href="https://developers.openai.com/codex/ide">install in your IDE.</a>
Expand All @@ -13,17 +13,17 @@ If you want Codex in your code editor (VS Code, Cursor, Windsurf), <a href="http

### Installing Codefx

[Codefx CLI 0.164.0](https://github.com/hitmux/codefx/releases/tag/rust-v0.164.0) is a stable release. Native packages and installer checks cover:
[Codefx CLI 0.165.0](https://github.com/hitmux/codefx/releases/tag/rust-v0.165.0) is a stable release. Native packages and installer checks cover:

| Platform | Architectures |
| --- | --- |
| Linux (musl) | x86_64, ARM64 |
| macOS | Intel, Apple Silicon |
| Windows | x64, ARM64 |
| Platform | Architectures |
| ------------ | -------------------- |
| Linux (musl) | x86_64, ARM64 |
| macOS | Intel, Apple Silicon |
| Windows | x64, ARM64 |

Use the reviewed installers below or the [verified installer bundle](https://github.com/hitmux/codefx/releases/download/rust-v0.164.0/codefx-installers-38f48572fe9f.zip). The original `rust-v0.164.0` source archive contains historical wrappers that uninstall existing packages before downloading; the revised installers are maintained independently of that binary build tag.
Use the reviewed installers below or the [verified installer bundle](https://github.com/hitmux/codefx/releases/download/rust-v0.165.0/codefx-installers-38f48572fe9f.zip). The original `rust-v0.165.0` source archive contains historical wrappers that uninstall existing packages before downloading; the revised installers are maintained independently of that binary build tag.

Linux / macOS — download the complete bootstrap before executing it:
Linux / macOS -- download the complete bootstrap before executing it:

```sh
(
Expand All @@ -36,21 +36,21 @@ Linux / macOS — download the complete bootstrap before executing it:
)
```

Windows — run in a non-elevated PowerShell:
Windows -- run in a non-elevated PowerShell:

```powershell
& ([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing -TimeoutSec 120 -ErrorAction Stop -Uri 'https://raw.githubusercontent.com/hitmux/codefx/main/scripts/install/install-codefx.ps1').Content))
```

Verify the selected command with `codex --version`; the executable remains named `codex` and reports `codefx 0.164.0`.
Verify the selected command with `codex --version`; the executable remains named `codex` and reports `codefx 0.165.0`.

The installer verifies release checksums, archive paths, package metadata and the staged executable before switching commands. It records the previous installation and restores it if cutover fails. Existing npm, pnpm, Bun, Vite+ and Homebrew registrations remain available; the new native command uses a dedicated installation directory.

Running Codex sessions and managed daemons are checked **before large package downloads**. In an interactive terminal, the installer asks for explicit approval before closing sessions. Answering no (the default) leaves Codex running and cancels the installation; non-interactive runs fail safely. For unattended updates you can pass `--stop-running` (Unix) / `-StopRunning` (Windows) from an external terminal. To wait for sessions to exit naturally, use `--defer-until-idle` / `-DeferUntilIdle` (900-second default, configurable timeout). Windows console sessions without a closeable window may still need to be closed manually. Configured independent daemons are migrated through the verified new CLI, with their original running or stopped state preserved. This migration pins the daemon to the verified CLI package; `codex app-server daemon update` returns it to Codefx production updates.

Codefx update checks use Codefx releases. The first migration clears the shared upstream version cache, with its original contents retained in the transaction backup. `--release` / `-Release` pins a version; the default follows the latest stable release.

[Installer options and recovery guide](docs/codefx-installer.md) · [Linux/macOS source](scripts/install/install-codefx.sh) · [Windows source](scripts/install/install-codefx.ps1) · [Native installation checks](https://github.com/hitmux/codefx/actions/runs/40171185576)
[Installer options and recovery guide](docs/codefx-installer.md) ; [Linux/macOS source](scripts/install/install-codefx.sh) ; [Windows source](scripts/install/install-codefx.ps1) ; [Native installation checks](https://github.com/hitmux/codefx/actions/runs/40171185576)

### Using Codex with your ChatGPT plan

Expand Down
2 changes: 1 addition & 1 deletion codex-cli/bin/codex.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function findCodexExecutable() {
}

const updateCommand =
"curl -fsSL https://raw.githubusercontent.com/caokai674/codefx/main/scripts/install/install-codefx.sh | sh";
"curl -fsSL https://raw.githubusercontent.com/hitmux/codefx/main/scripts/install/install-codefx.sh | sh";
throw new Error(
`Missing optional dependency ${platformPackage}. Reinstall Codex: ${updateCommand}`,
);
Expand Down
Loading
Loading