# 使用 Homebrew Cask 安装 opencodex

查看 opencodex 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install cask:opencodex
```

其他安装命令:

### macOS

- Homebrew Cask (100%):

```sh
brew install --cask opencodex
```

  证据: local Homebrew cask metadata

## 软件包事实

- **软件包键:** cask:opencodex
- **软件包管理器:** Homebrew Cask
- **软件包管理器页面:** <https://formulae.brew.sh/cask/opencodex>
- **版本:** 2.97.0
- **来源摘要:** Proxy that connects AI coding agents to other LLM providers
- **主页:** <https://opencodex.me/>
- **仓库:** <https://github.com/lidge-jun/opencodex>
- **上游文档:** <https://opencodex.me/>
- **源码归档:** <https://github.com/lidge-jun/opencodex/releases/download/v2.97.0/OpenCodex-2.97.0-macos.dmg>
- **已生成:** 2026-11-04T12:20:42+00:00

## 安装行为

- post-install 钩子: 未定义
- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-11-04
- 管理器版本: 2.97.0
- 本地数据: OK
- 上游仓库: https://github.com/lidge-jun/opencodex
- 信息: No package-manager update timestamp was available.
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

OpenCodex is a local proxy and routing layer that lets AI coding clients use multiple hosted or local model providers through their existing interfaces.

### 项目历史

OpenCodex was created as a local universal-provider proxy for AI coding agents. Its scope expanded to translate between OpenAI Responses, OpenAI-compatible, and Anthropic-style interfaces while preserving streaming, tool calls, reasoning data, and images.

Later development added provider presets, OAuth login, model combinations, account pooling, sub-agent routing, sidecars for search and vision, a management dashboard, desktop packaging, and explicit integrations for multiple coding clients.

### 采用历史

OpenCodex broadened from a Codex-oriented local proxy into a gateway supporting Codex CLI, Codex App and SDK workflows, Claude Code, Claude Desktop, Grok Build, and other compatible clients. It is distributed as a desktop application, standalone executable, and npm-installed command-line tool.

The project maintains provider presets, adapters, client integrations, and a dashboard so users can change model backends while retaining their preferred coding-agent interface.

### 使用方式

Users run the initialization wizard, select a provider and model, supply an API key or OAuth login, and optionally let OpenCodex inject its local endpoint into Codex configuration. The proxy can then be started as a foreground command or managed background service.

Advanced workflows route different models or tasks to different providers, define failover or weighted combinations, expose routed models to sub-agents, and inspect live requests through the dashboard. Stopping or ejecting the integration restores native Codex routing.

### 为什么软件包爱好者会关心

OpenCodex exemplifies the rapidly growing package layer between AI coding agents and model providers. It turns protocol translation, provider authentication, model discovery, routing, failover, and account selection into a locally managed service.

Its reversible edits to Codex configuration and catalogs are especially relevant to package maintainers: starting the proxy integrates it with existing clients, while stop, restore, and eject operations remove generated routing state without deleting the user's native configuration.

### 时间线

- Initial project: OpenCodex provided a local provider proxy for Codex workflows.
- Subsequent development: Support expanded to Claude Code, desktop clients, provider OAuth, routing combinations, account pools, sidecars, and managed sub-agent catalogs.

### Related projects

- OpenAI Codex is a primary client whose configuration and model catalog OpenCodex can manage reversibly.
- Claude Code is another officially documented client and can route its inference traffic through OpenCodex.
- Provider services and local model servers sit upstream of OpenCodex through built-in or custom adapters.

### 来源

- <https://github.com/lidge-jun/opencodex#readme>
- <https://opencodex.me/>
- <https://opencodex.me/getting-started/quickstart/>
- <https://opencodex.me/guides/codex-integration/>
- <https://opencodex.me/reference/client-support/>


## 安全说明

没有找到 opencodex 的匹配本地密钥处理 manifest。软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: $OPENCODEX_HOME/config.json (default ~/.opencodex/config.json), $CODEX_HOME/config.toml (default ~/.codex/config.toml), $CODEX_HOME/opencodex.config.toml (default ~/.codex/opencodex.config.toml), $CODEX_HOME/opencodex-catalog.json (default ~/.codex/opencodex-catalog.json)
- Windows: %USERPROFILE%\.opencodex\config.json, %USERPROFILE%\.codex\config.toml, %USERPROFILE%\.codex\opencodex.config.toml, %USERPROFILE%\.codex\opencodex-catalog.json

## Credential files

- Unix: $OPENCODEX_HOME/auth.json (default ~/.opencodex/auth.json)
- Windows: %USERPROFILE%\.opencodex\auth.json
## 源数据库详情

- **Source Database:** Homebrew cask API
- **Tap:** homebrew/cask
- **Full Token:** opencodex
- **Names:** OpenCodex
- **Depends On:** Macos: >=: 13
- **Artifacts:** App: 1, Target: 1, Uninstall: 1, Zap: 1
- **Auto Updates:** yes
- **Deprecated:** no
- **Disabled:** no


## 相关链接

- [Homebrew Cask packages](https://pkg.so/zh-hans/homebrew-cask-packages/) - Generated from Homebrew Cask package-manager metadata.
- [Homebrew Cask applications](https://pkg.so/zh-hans/homebrew-cask-applications/) - Cask artifact metadata includes an app bundle.
- [codex](https://pkg.so/zh-hans/cask/codex/) - Codex is a primary supported client: OpenCodex can inject its proxy endpoint and synchronized model catalog into Codex, then restore Codex's native configuration when ejected.

  来源: <https://opencodex.me/guides/codex-integration/> · <https://github.com/openai/codex#readme>
- [claude-code](https://pkg.so/zh-hans/cask/claude-code/) - Claude Code can use OpenCodex as its inference gateway, allowing its normal agent interface to reach the providers and routed models configured in OpenCodex.

  来源: <https://opencodex.me/guides/claude-code/> · <https://github.com/anthropics/claude-code#readme>
- [claude-code-router](https://pkg.so/zh-hans/brew/claude-code-router/) - Choose Claude Code Router for a gateway centered on Claude Code profiles and routing; choose OpenCodex for broader managed integrations spanning Codex, Claude Code, desktop clients, account pools, and sidecars.

  来源: <https://github.com/musistudio/claude-code-router#readme> · <https://opencodex.me/reference/client-support/>

## Combined YAML source

View the package source record on GitHub. [combined/opencodex.yml](https://github.com/mxcl/pkgdb/blob/main/combined/opencodex.yml)


## 来源

- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- package relationship graph
- cross-ecosystem install command graph
