claudex
skill
Warn
Health Warn
- No license — Repository has no license file
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 26 GitHub stars
Code Warn
- process.env — Environment variable access in scripts/build-release.ts
- process.env — Environment variable access in src/claudex.ts
Permissions Pass
- Permissions — No dangerous permissions requested
Purpose
This is a Bun-based launcher that runs Claude Code against an OpenAI-compatible endpoint, translating Anthropic API requests to OpenAI's Codex/Responses API. It acts as a proxy to let developers use OpenAI models within the Claude Code environment.
Security Assessment
The tool reads sensitive authentication data, including API keys, ChatGPT bearer tokens, and OAuth refresh tokens from local configuration files. It also makes external network requests to upstream APIs (like chatgpt.com) and automatically refreshes expired tokens. The codebase accesses environment variables to read these credentials and configuration settings. No hardcoded secrets or dangerous shell executions were found. No highly dangerous permissions are requested. Because it handles sensitive tokens and communicates externally, the overall risk is Medium.
Quality Assessment
The project is actively maintained, with its last push occurring very recently. It has a small but present community footprint with 26 GitHub stars, indicating some level of peer review and usage. However, the repository lacks a license file, which is a significant concern. Without a defined license, the legal terms of use, modification, and distribution are technically "all rights reserved" by the author, which may restrict enterprise adoption.
Verdict
Use with caution — the tool is active and functional, but handle it carefully due to its access to sensitive tokens and the absence of an open-source license.
This is a Bun-based launcher that runs Claude Code against an OpenAI-compatible endpoint, translating Anthropic API requests to OpenAI's Codex/Responses API. It acts as a proxy to let developers use OpenAI models within the Claude Code environment.
Security Assessment
The tool reads sensitive authentication data, including API keys, ChatGPT bearer tokens, and OAuth refresh tokens from local configuration files. It also makes external network requests to upstream APIs (like chatgpt.com) and automatically refreshes expired tokens. The codebase accesses environment variables to read these credentials and configuration settings. No hardcoded secrets or dangerous shell executions were found. No highly dangerous permissions are requested. Because it handles sensitive tokens and communicates externally, the overall risk is Medium.
Quality Assessment
The project is actively maintained, with its last push occurring very recently. It has a small but present community footprint with 26 GitHub stars, indicating some level of peer review and usage. However, the repository lacks a license file, which is a significant concern. Without a defined license, the legal terms of use, modification, and distribution are technically "all rights reserved" by the author, which may restrict enterprise adoption.
Verdict
Use with caution — the tool is active and functional, but handle it carefully due to its access to sensitive tokens and the absence of an open-source license.
use codex model on claude code
README.md
claudex
claudex is a Bun-based launcher that runs Claude Code against an OpenAI-compatible endpoint.
You can download binaries from Releases.
Local usage
- Install dependencies:
bun install
- Ensure Codex auth file exists (config is optional but recommended):
~/.codex/auth.json
~/.codex/config.toml
- Run:
./claudex
Wrapper flags:
--model <id>/--upstream-model <id>: override the upstream OpenAI model for this run only.claudexconsumes this flag itself and does not forward it to the Claude binary.--no-safe: disablesCLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1for that run.- By default,
claudexenables safe mode (CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1).
Example:
./claudex --model gpt-5.5-chat
Optional environment variables:
CLAUDEX_FORCE_MODEL(used when no CLI--model/--upstream-modelis given; otherwise CLI wins. Default: value ofmodelfrom~/.codex/config.toml; fallback:gpt-5.3-codex)CLAUDEX_DEFAULT_REASONING_EFFORT(default:xhigh)CLAUDEX_CLAUDE_BINCLAUDEX_CODEX_CONFIG(overrides~/.codex/config.toml)CLAUDEX_CODEX_AUTH(overrides~/.codex/auth.json)CLAUDEX_MODEL_PROVIDER(overridesmodel_providerselection)CLAUDEX_UPSTREAM_BASE_URL(force endpoint URL)CLAUDEX_UPSTREAM_WIRE_API(messagesorresponses; overrides providerwire_api)CLAUDEX_UPSTREAM_API_KEY(force API key)CLAUDEX_UPSTREAM_BEARER_TOKEN(force bearer token for ChatGPT token mode)CLAUDEX_CHATGPT_BEARER_TOKEN(alias ofCLAUDEX_UPSTREAM_BEARER_TOKEN)CLAUDEX_CHATGPT_ACCOUNT_ID(overrideChatGPT-Account-Idheader)CLAUDEX_CHATGPT_BASE_URL(default:https://chatgpt.com/backend-api/codex)CLAUDEX_CHATGPT_DEFAULT_MODEL(default:gpt-5-codexwhen ChatGPT mode is active and no model is explicitly configured)CLAUDEX_FORCE_LOGIN_METHOD(default:console; set tononeto disable injection)CLAUDEX_PORTCLAUDEX_DEBUG=1
Authentication note:
- Priority is:
- Use
model_provider/CLAUDEX_UPSTREAM_BASE_URLwhen resolvable, authenticated via API key. - If no provider is resolvable, fall back to official ChatGPT endpoint (
https://chatgpt.com/backend-api/codex) and usetokens.access_token(thentokens.id_token) from~/.codex/auth.json.
- Use
- When the upstream uses
wire_api = "responses"(or ChatGPT fallback mode),claudexnow translates AnthropicPOST /v1/messagesrequests, tools, and tool results to the OpenAI Responses API and maps streamed tool calls back into Anthropictool_useblocks. - In token mode,
claudexautomatically refreshes expired tokens viatokens.refresh_tokenwhen possible. - In token mode, if
tokens.account_idexists,claudexsends it asChatGPT-Account-Id. - To avoid model-availability errors on ChatGPT accounts,
claudexusesgpt-5-codexas the implicit default model in ChatGPT mode (unless you explicitly setmodelorCLAUDEX_FORCE_MODEL). claudexsetsANTHROPIC_API_KEYto the upstream bearer credential and, unless you pass--settingsyourself, injects--settings {"forceLoginMethod":"console"}to avoid Claude.ai-subscription-first login flows.
Quality gates
- Typecheck:
bun run typecheck - Tests:
bun test bun testincludes an integration test that round-trips Anthropictool_use/tool_resultthrough a Responses upstream mock (tests/proxy.integration.test.ts).- Combined check:
bun run check - Enable local git hook:
bun run setup:hooks
Automated release
GitHub Actions runs on every push to main and once per day:
- Fetches the latest
install.shfromhttps://claude.ai/install.sh. - Extracts
GCS_BUCKETfrom that script and reads the latest Claude Code version. - On
pushtomain, always creates a rolling release tagclaude-vX.Y.Z-build.<run_number>. - On scheduled/manual runs, creates
claude-vX.Y.Zonly when that upstream version is not released yet. - Builds
claudexbinaries for Linux, macOS, and Windows via Bun--compile. - Publishes a GitHub release with those binaries.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found