🖥️ 不想手动下载?Codex App Manager 是基于本镜像的桌面客户端——一键安装、增量更新、干净卸载官方 Codex。
🖥️ Prefer one click? Codex App Manager — the desktop client built on this mirror — installs, updates and uninstalls official Codex for you.
---
本项目由 DuckCoding 赞助支持
为 Claude Code / Codex / Gemini CLI 提供按量计费的 API 中转服务。 Sponsored by DuckCoding — a pay-as-you-go API relay for Claude Code / Codex / Gemini CLI.
## 许可
[MIT](./LICENSE)。本项目与 OpenAI、Microsoft 无隶属或背书关系。
---
# English
`codex-app-mirror` is an installer mirror and distribution project for the OpenAI Codex desktop app, providing a stable, verifiable way to obtain it when the Microsoft Store or official downloads are inconvenient. The project only mirrors — it does not build, modify, or repackage packages. Stable publishes official Windows MSIX and macOS DMG assets verbatim to GitHub Releases and CDN short links. During preview, the unified ChatGPT Linux desktop app (including Codex) is isolated in GitHub prereleases only. For macOS the project also provides a Sparkle incremental-update appcast, consumed by the downstream [Codex App Manager](#en-ecosystem) client.
## At a glance
| Capability | Detail |
|---|---|
| 🪟 **Windows MSIX** | Mirrored from the Microsoft Store package: x64 is published, ARM64 is tracked in the manifest and mirror paths |
| 🍎 **macOS DMG** | Apple Silicon + Intel, official packages, unmodified |
| 🐧 **Linux Preview** | DEB for Ubuntu/Debian and RPM for Fedora, x64 + ARM64; GitHub prerelease only, never CDN/latest |
| 🔄 **Incremental auto-update** | macOS Sparkle appcast + delta enclosures, pinned EdDSA signatures kept byte-for-byte |
| 🌏 **Reachable in China** | Cloudflare R2 globally + auto-failover to an S3 mirror for mainland China; one link, auto-routed |
| ⏱️ **15-minute probe** | Cloudflare Cron primary + GitHub Actions 6-hour fallback; releases only when upstream changes |
| 🔐 **Verifiable** | Every release ships `SHA256SUMS.txt` and a `release-manifest.json` of upstream fingerprints |
## Download & install
Open the [latest GitHub Release](https://github.com/Wangnov/codex-app-mirror/releases/latest) and grab your platform's asset:
- **Windows x64**: `OpenAI.Codex_..._x64__2p2nqsd0c76g0.Msix`
- **Windows B2B bootstrap**: `Install-Codex-Windows.ps1` (install, model injection, and temporary first-launch TUN)
- **Windows ARM64**: `OpenAI.Codex_..._arm64__2p2nqsd0c76g0.Msix` (published when the official download URL resolves)
- **Apple Silicon Mac**: `Codex-mac-arm64.dmg`
- **Intel Mac**: `Codex-mac-x64.dmg`
### Linux Preview
OpenAI announced the unified ChatGPT desktop app for Linux Preview on 2026-08-11, including ChatGPT, ChatGPT Work, and Codex. Linux packages are not mixed into Stable Latest. Browse [GitHub Releases](https://github.com/Wangnov/codex-app-mirror/releases) for a `codex-app-linux-preview-` prerelease:
- **Ubuntu 24.04/26.04 and Debian 13**: `chatgpt__amd64.deb` or `chatgpt__arm64.deb`
- **Fedora 43/44**: `chatgpt--1.x86_64.rpm` or `chatgpt--1.aarch64.rpm`
Linux Preview is an explicitly isolated third channel: `stable | beta | linux-preview`. An on-demand run requires an exact version, verifies OpenAI's signed APT/RPM metadata and all four package checksums, and publishes without advancing GitHub Latest, writing R2/S3, or creating `latest/linux*` routes. The official packages configure OpenAI's own update repository after installation, so subsequent automatic updates come directly from OpenAI by default.
Or use the CDN short links (recommended — **auto-routed to the fastest node**: mainland China via the S3 mirror, elsewhere via R2; latest version only):
| Platform | Short link |
|---|---|
| Windows x64 (compat alias) | |
| Windows x64 | |
| Windows ARM64 (when available for the current version) | |
| Apple Silicon Mac | |
| Intel Mac | |
| Checksums | |
| Release manifest | |
For **older versions**, browse [GitHub Releases](https://github.com/Wangnov/codex-app-mirror/releases) by release/tag — the short links only point at the latest. Download `SHA256SUMS.txt` too if you want to verify integrity.
## macOS auto-update
Beyond manual DMG downloads, macOS supports **Sparkle incremental auto-update**. The downstream Codex App Manager client subscribes to this mirror's appcast and downloads only the **delta between versions** rather than the full installer each time:
- Apple Silicon:
- Intel:
The mirror copies the official Sparkle archives and OpenAI's EdDSA signatures **byte-for-byte**, rewriting only the `enclosure` URL to point at the mirror. Because EdDSA signs the archive bytes themselves, the original signature stays valid as long as the mirror is byte-identical — the mirror never forges or recomputes a signature. Clients with no matching delta fall back to the full archive.
## How it works
### Probe → compare → release
Each run starts with a lightweight probe and only downloads/releases when upstream actually changed:
- **Windows**: query Microsoft Store DisplayCatalog for x64 / ARM64 package metadata, then resolve downloadable MSIX monikers + temporary Microsoft CDN URLs via FE3 metadata; ARM64 is recorded as `catalog-only` until its URL resolves
- **macOS**: request the official DMGs and appcast, read `ETag` / `Last-Modified` / `Content-Length` and appcast version fields
- **Linux Preview**: verify the official APT `InRelease` and RPM `repomd.xml` with a pinned key, resolve four versioned packages, then gate package name, version, architecture, file list, embedded key, and RPM package signatures
- **Compare**: diff those stable fields against the latest release's `release-manifest.json`
No change → it stops after the probe. Any platform changes → it downloads every downloadable installer, writes checksums + manifest, builds the Sparkle appcasts, and publishes a new GitHub Release.
### Two-tier mirror + geo routing
After release, assets sync to two mirrors fronted by a Cloudflare Worker:
- **Global**: Cloudflare R2 (`codexapp-r2.agentsmirror.com`)
- **Mainland China**: an S3 mirror served via presigned URLs
The router reads `CF-IPCountry` and sends mainland-China visitors to the S3 mirror, everyone else to R2 — transparent to users, one short link, auto-routed.
### Scheduling
- **Primary**: a Cloudflare Cron Trigger fires `mirror.yml` (`workflow_dispatch`) every 15 minutes
- **Fallback**: GitHub Actions' own `schedule` runs every 6 hours (`11 */6 * * *`), in case GitHub's scheduler is delayed or skipped
### Ecosystem: Codex App Manager
This mirror isn't only for manual downloads — it's the update backend for the **Codex App Manager** desktop client, which detects platform/capabilities locally and consumes the Sparkle appcast here for install and incremental updates. The mirror stays narrow and stable, owning the "distribution + update" infrastructure layer.
➡️ Website: [codexapp.agentsmirror.com](https://codexapp.agentsmirror.com) · Repo: [Wangnov/Codex-App-Manager](https://github.com/Wangnov/Codex-App-Manager)
## Version numbers
Releases are grouped by the Codex app's internal version, not by the four-part Windows Store MSIX package version. The Windows package version from the MSIX moniker (for example `26.623.5175.0`) is still recorded in the release body and `release-manifest.json` as platform package metadata. The Codex app version is read from the Windows package's app `package.json` and aligned with macOS `CFBundleShortVersionString`, for example `26.623.41415`.
Release tags and titles use the internal version:
```text
codex-app-26.623.41415
Codex App Mirror 26.623.41415
```
If one platform has not yet published the same internal version, the mirror creates a prerelease for that internal version and marks the missing platform as waiting in the "Versions and publish times" table. Architectures that have shipped immediately advance the R2/S3 `latest/*` short links; architectures that have not shipped that version keep pointing at their own current latest package. Once all four architectures arrive, the same Release is completed and promoted to latest.
Windows x64 is the required Windows package; Windows ARM64 is an optional architecture. If the Microsoft Store ARM64 rollout drifts between probe and download, that run skips the local ARM64 upload and preserves the previous checksum-matching `latest/win-arm64`; it is replaced once a stable ARM64 package is detected.
## Windows enterprise GUI launcher
`windows-launcher/` contains a streamlined Windows x64 Tauri GUI using the same visual language and unchanged business API as the Agent Relay launcher. It keeps only sign-in, registration, Token usage summaries and trends, child-account creation and usage, plus Codex installation, configuration, launch, and close controls. Image, wallet, memo, product portal, and end-user backend settings are intentionally excluded.
The production backend is fixed to `https://api.lotjc.com/sub`. The launcher uses `/v1/auth/login`, `/v1/auth/register`, `/v1/usage`, `/v1/children`, `/v1/children/{id}/usage`, and `/v1/codex/lease`; it never calls `/v1/install-proxy/lease`. `.github/workflows/windows-launcher.yml` produces `Codex-Enterprise-Launcher-Setup-x64.exe` on a Windows runner. A build agent may also run `npm ci` followed by `npm run build:windows` in `windows-launcher/`.
The GUI neither modifies nor re-signs the official MSIX. It reads `https://codexapp.agentsmirror.com/latest/manifest`, compares the latest Windows x64 package version with the locally installed four-part AppX version, and displays an “Update Codex” action when newer. Both install and update verify the manifest SHA-256, Authenticode signature, and Microsoft signer before invoking `Add-AppxPackage`. It injects the relay profile returned by the existing backend and enables temporary TUN only for the first successful Codex launch. TUN remains active for a 60-second grace period after Codex runs continuously for 30 seconds, with a separate 15-minute hard timeout.
### PowerShell fallback
Each Release also includes a separate `Install-Codex-Windows.ps1`. It does not modify or re-sign the official MSIX. On Windows it:
1. calls `/v1/auth/login` and `/v1/codex/lease` on your business backend;
2. backs up existing `~/.codex/config.toml` and `auth.json`, then injects the relay model configuration;
3. downloads, signature-checks, and installs the official MSIX;
4. downloads the fixed Mihomo YAML and enables an elevated TUN only for the first successful Codex launch;
5. stops Mihomo and deletes temporary YAML after Codex runs for 30 seconds plus a 60-second grace period, with a 15-minute hard timeout.
Download `install.ps1`, `uninstall.ps1`, and `Install-Codex-Windows.ps1` from the Release into one directory. Run these commands from an **administrator PowerShell** in that directory:
```powershell
# Install; B2B credentials are prompted and the backend is preconfigured.
.\install.ps1
# Uninstall; confirmation is requested by default.
.\uninstall.ps1
```
If execution policy blocks the files, enable them only for the current shell with `Set-ExecutionPolicy -Scope Process Bypass`. The installer never calls `/v1/install-proxy/lease`; use `-ForceFirstLaunchTun` only for troubleshooting. Uninstall stops managed Mihomo, removes the AppX and first-launch state, and restores backed-up Codex configuration. Pass `-KeepCodexConfig` to preserve current configuration. The bootstrap currently supports Windows x64; the official MSIX remains byte-for-byte unchanged.
## Windows "blocked by your system administrator"
If double-clicking the `.Msix` shows "This app has been blocked by your system administrator", the package is usually not damaged — Windows is blocking sideloaded MSIX / AppX installation, or App Installer / AppX deployment is disabled by policy.
- Prefer the official [Microsoft Store page](https://apps.microsoft.com/detail/9plm9xgg6vks) first.
- On a personal PC, check that Windows allows apps from outside the Store and that App Installer is available.
- For a detailed error, run from an elevated terminal: `Add-AppxPackage -Path .\OpenAI.Codex_..._x64__2p2nqsd0c76g0.Msix`
- On managed (work/school) devices, ask the administrator to allow the install. This mirror does not and cannot bypass local install policies.
## Upstream sources
macOS DMGs use OpenAI's official static URLs, version-pinned via the official appcast:
- `https://persistent.oaistatic.com/codex-app-prod/Codex.dmg`
- `https://persistent.oaistatic.com/codex-app-prod/Codex-latest-x64.dmg`
The Windows MSIX is resolved from Microsoft Store metadata (DisplayCatalog → FE3 → Microsoft CDN). The resolver is implemented directly in .NET and does not depend on third-party Store helpers such as `StoreLib`.
Linux Preview uses OpenAI's official APT/RPM repository metadata with pinned signing-key fingerprint `3BFA0E4AE8B8CC16A2D9BA684A3B4A566C4660E4`. The official web entry point is ; repository snapshots are published only to isolated prereleases.
## Non-goals
- Does not modify Codex installer packages
- Does not bypass Microsoft Store or OpenAI authorization
- Does not forge or recompute Sparkle signatures (official signatures are copied verbatim)
- Does not preserve Microsoft CDN temporary URLs as permanent links
- Does not guarantee your local Windows AppX / MSIX policy will accept the package
- Is not a replacement for official OpenAI / Microsoft / Microsoft Store distribution
## Acknowledgements
- **[LINUX DO](https://linux.do/)** community — the home for feedback on download availability, install results, and checksums.
- **Institute of High Energy Physics, Chinese Academy of Sciences (IHEP)** — provides the S3 mirror storage that keeps downloads and updates fast and reachable inside mainland China.
## Star History
## License
[MIT](./LICENSE). Not affiliated with or endorsed by OpenAI or Microsoft.