{"id":47241075,"url":"https://github.com/edamame-x/claudex","last_synced_at":"2026-04-17T05:08:04.658Z","repository":{"id":342306853,"uuid":"1173474744","full_name":"EdamAme-x/claudex","owner":"EdamAme-x","description":"use codex model on claude code","archived":false,"fork":false,"pushed_at":"2026-04-08T00:59:14.000Z","size":58,"stargazers_count":25,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-08T02:32:22.804Z","etag":null,"topics":["claude-code","codex"],"latest_commit_sha":null,"homepage":"https://evex.land","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EdamAme-x.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-05T12:06:03.000Z","updated_at":"2026-03-10T09:16:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/EdamAme-x/claudex","commit_stats":null,"previous_names":["edamame-x/claudex"],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/EdamAme-x/claudex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdamAme-x%2Fclaudex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdamAme-x%2Fclaudex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdamAme-x%2Fclaudex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdamAme-x%2Fclaudex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EdamAme-x","download_url":"https://codeload.github.com/EdamAme-x/claudex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdamAme-x%2Fclaudex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31826902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"online","status_checked_at":"2026-04-15T02:00:06.175Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-code","codex"],"created_at":"2026-03-14T02:49:43.638Z","updated_at":"2026-04-15T05:02:07.432Z","avatar_url":"https://github.com/EdamAme-x.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# claudex\n\n`claudex` is a Bun-based launcher that runs Claude Code against an OpenAI-compatible endpoint.\n\nYou can download binaries from [Releases](https://github.com/EdamAme-x/claudex/releases).\n\n## Local usage\n\n0. Install dependencies:\n\n```bash\nbun install\n```\n\n1. Ensure Codex auth file exists (config is optional but recommended):\n\n```text\n~/.codex/auth.json\n~/.codex/config.toml\n```\n\n2. Run:\n\n```bash\n./claudex\n```\n\nWrapper flags:\n\n- `--model \u003cid\u003e` / `--upstream-model \u003cid\u003e`: override the upstream OpenAI model for this run only. `claudex` consumes this flag itself and does not forward it to the Claude binary.\n- `--no-safe`: disables `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1` for that run.\n- By default, `claudex` enables safe mode (`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1`).\n\nExample:\n\n```bash\n./claudex --model gpt-5.5-chat\n```\n\nOptional environment variables:\n\n- `CLAUDEX_FORCE_MODEL` (used when no CLI `--model` / `--upstream-model` is given; otherwise CLI wins. Default: value of `model` from `~/.codex/config.toml`; fallback: `gpt-5.3-codex`)\n- `CLAUDEX_DEFAULT_REASONING_EFFORT` (default: `xhigh`)\n- `CLAUDEX_CLAUDE_BIN`\n- `CLAUDEX_CODEX_CONFIG` (overrides `~/.codex/config.toml`)\n- `CLAUDEX_CODEX_AUTH` (overrides `~/.codex/auth.json`)\n- `CLAUDEX_MODEL_PROVIDER` (overrides `model_provider` selection)\n- `CLAUDEX_UPSTREAM_BASE_URL` (force endpoint URL)\n- `CLAUDEX_UPSTREAM_WIRE_API` (`messages` or `responses`; overrides provider `wire_api`)\n- `CLAUDEX_UPSTREAM_API_KEY` (force API key)\n- `CLAUDEX_UPSTREAM_BEARER_TOKEN` (force bearer token for ChatGPT token mode)\n- `CLAUDEX_CHATGPT_BEARER_TOKEN` (alias of `CLAUDEX_UPSTREAM_BEARER_TOKEN`)\n- `CLAUDEX_CHATGPT_ACCOUNT_ID` (override `ChatGPT-Account-Id` header)\n- `CLAUDEX_CHATGPT_BASE_URL` (default: `https://chatgpt.com/backend-api/codex`)\n- `CLAUDEX_CHATGPT_DEFAULT_MODEL` (default: `gpt-5-codex` when ChatGPT mode is active and no model is explicitly configured)\n- `CLAUDEX_FORCE_LOGIN_METHOD` (default: `console`; set to `none` to disable injection)\n- `CLAUDEX_PORT`\n- `CLAUDEX_DEBUG=1`\n\nAuthentication note:\n\n- Priority is:\n  1. Use `model_provider` / `CLAUDEX_UPSTREAM_BASE_URL` when resolvable, authenticated via API key.\n  2. If no provider is resolvable, fall back to official ChatGPT endpoint (`https://chatgpt.com/backend-api/codex`) and use `tokens.access_token` (then `tokens.id_token`) from `~/.codex/auth.json`.\n- When the upstream uses `wire_api = \"responses\"` (or ChatGPT fallback mode), `claudex` now translates Anthropic `POST /v1/messages` requests, tools, and tool results to the OpenAI Responses API and maps streamed tool calls back into Anthropic `tool_use` blocks.\n- In token mode, `claudex` automatically refreshes expired tokens via `tokens.refresh_token` when possible.\n- In token mode, if `tokens.account_id` exists, `claudex` sends it as `ChatGPT-Account-Id`.\n- To avoid model-availability errors on ChatGPT accounts, `claudex` uses `gpt-5-codex` as the implicit default model in ChatGPT mode (unless you explicitly set `model` or `CLAUDEX_FORCE_MODEL`).\n- `claudex` sets `ANTHROPIC_API_KEY` to the upstream bearer credential and, unless you pass `--settings` yourself, injects `--settings {\"forceLoginMethod\":\"console\"}` to avoid Claude.ai-subscription-first login flows.\n\n## Quality gates\n\n- Typecheck: `bun run typecheck`\n- Tests: `bun test`\n- `bun test` includes an integration test that round-trips Anthropic `tool_use` / `tool_result` through a Responses upstream mock (`tests/proxy.integration.test.ts`).\n- Combined check: `bun run check`\n- Enable local git hook: `bun run setup:hooks`\n\n## Automated release\n\nGitHub Actions runs on every push to `main` and once per day:\n\n1. Fetches the latest `install.sh` from `https://claude.ai/install.sh`.\n2. Extracts `GCS_BUCKET` from that script and reads the latest Claude Code version.\n3. On `push` to `main`, always creates a rolling release tag `claude-vX.Y.Z-build.\u003crun_number\u003e`.\n4. On scheduled/manual runs, creates `claude-vX.Y.Z` only when that upstream version is not released yet.\n5. Builds `claudex` binaries for Linux, macOS, and Windows via Bun `--compile`.\n6. Publishes a GitHub release with those binaries.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedamame-x%2Fclaudex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedamame-x%2Fclaudex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedamame-x%2Fclaudex/lists"}