{"id":50875628,"url":"https://github.com/numandev1/claude-codex","last_synced_at":"2026-06-15T09:32:21.054Z","repository":{"id":363934629,"uuid":"1265617700","full_name":"numandev1/claude-codex","owner":"numandev1","description":"Claude and Codex Multiple Session Manager","archived":false,"fork":false,"pushed_at":"2026-06-11T00:32:55.000Z","size":276,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-11T02:17:27.605Z","etag":null,"topics":["account-switcher","anthropic","chatgpt","claude","claude-code","cli","codex","ink","openai","rate-limit","rate-limiting","session-manager","tui","usage"],"latest_commit_sha":null,"homepage":"","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/numandev1.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-06-10T23:59:38.000Z","updated_at":"2026-06-11T00:32:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/numandev1/claude-codex","commit_stats":null,"previous_names":["numandev1/claude-codex"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/numandev1/claude-codex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numandev1%2Fclaude-codex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numandev1%2Fclaude-codex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numandev1%2Fclaude-codex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numandev1%2Fclaude-codex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/numandev1","download_url":"https://codeload.github.com/numandev1/claude-codex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numandev1%2Fclaude-codex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34357281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","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":["account-switcher","anthropic","chatgpt","claude","claude-code","cli","codex","ink","openai","rate-limit","rate-limiting","session-manager","tui","usage"],"created_at":"2026-06-15T09:32:20.357Z","updated_at":"2026-06-15T09:32:20.966Z","avatar_url":"https://github.com/numandev1.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n \u003cimg height=\"300\" src=\"/assets/logo.png\" /\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# Claude / Codex Session Manager — Switch \u0026 Borrow Accounts\n\n**One keystroke to switch between all your Codex and Claude Code logins, see which account still has quota — and borrow a friend's Codex / Claude without ever knowing their password.**\n\n[![npm version](https://img.shields.io/npm/v/claudecodex-cli.svg)](https://www.npmjs.com/package/claudecodex-cli)\n[![node](https://img.shields.io/node/v/claudecodex-cli.svg)](https://www.npmjs.com/package/claudecodex-cli)\n[![license](https://img.shields.io/npm/l/claudecodex-cli.svg)](./LICENSE)\n\n\u003c/div\u003e\n\n---\n\nBoth **Codex** and **Claude Code** keep only **one** active login at a time — log into a second\naccount and the first is signed out. If you juggle multiple ChatGPT/Claude subscriptions (your own,\na teammate's, a friend's), you're constantly re-logging in and losing your place.\n\n**claudecodex** saves each login as a named **session**, lets you switch between them instantly, and\nshows a **live dashboard** of every account's remaining **5-hour** and **weekly** limits — read\nstraight from each provider's own usage API, so you see real numbers *without* switching first.\n\nIt can also [**borrow Codex / Claude from a friend**](#borrow-codex--claude-from-a-friend--without-their-password):\nsend them a link, they tap \"Authorise\" in their browser, and a scoped coding-tool token lands on your\nmachine — without you ever getting their password or account access.\n\n\u003cdiv align=\"center\"\u003e\n\n![claudecodex dashboard](https://raw.githubusercontent.com/numandev1/claude-codex/main/assets/dashboard.png)\n\n\u003c/div\u003e\n\n## Install\n\n**No install (recommended to try):**\n\n```bash\nnpx claudecodex-cli\n```\n\n**Global install** — then use the short `ccx` command anywhere:\n\n```bash\nnpm install -g claudecodex-cli\nccx\n```\n\n\u003e Installed globally, `ccx` checks npm for a newer version on startup and offers to update\n\u003e (you confirm; it never updates silently). Opt out with `CLAUDECODEX_NO_UPDATE=1`.\n\nRequires **Node ≥ 18**. macOS and Linux. (Claude support reads the macOS Keychain / Claude's\ncredentials file; Codex reads `~/.codex/auth.json`.)\n\n## Quick start\n\n```bash\nccx # pick Codex or Claude, then manage interactively\n```\n\n1. Log into an account the normal way (`codex login`, or sign in to Claude Code).\n2. In `ccx`, press **s** to save it as a session (e.g. `work`).\n3. Repeat for your other accounts.\n4. Press **b** to jump to whichever account has the most quota — then run `codex` / `claude`.\n\n## Commands\n\nInteractive (run `ccx`, or `ccx codex` / `ccx claude`):\n\n| Key | Action |\n|----:|--------|\n| `↑/↓` `enter` | select / switch to a session |\n| `b` | switch to the **best** session (most 5h headroom, skips exhausted) |\n| `g` | **get** a new session — browser sign-in for another account |\n| `s` | **save** the current login as a session |\n| `c` | **copy** the selected session's token to the clipboard (to share) |\n| `a` | **accept** a token from the clipboard (paste a shared one in) |\n| `r` | **remote link** — generate a guide page your friend opens to share their session |\n| `n` `d` `R` | rename · delete · refresh live limits |\n| `q` | back to provider chooser (or quit) |\n\nScriptable (`ccx \u003ccodex|claude\u003e \u003ccommand\u003e`):\n\n```bash\nccx codex ls                     # dashboard with live limits\nccx codex save work              # save current login\nccx codex use work               # switch active login\nccx codex best                   # switch to the account with most quota\nccx claude refresh               # refresh every session's live limits\nccx codex get-session alice      # browser login → save a new account\nccx codex share work tok.txt     # write a shareable token file\nccx codex set work             # save a token from the clipboard (or pass it / @file / stdin)\nccx codex rename work old        # rename / delete\nccx codex delete old\nccx codex remote                 # generate a remote guide link for a friend\nccx claude remote                # same for Claude\n```\n\n## Borrow Codex / Claude from a friend — without their password\n\nIf a friend has a ChatGPT Plus or Claude Pro subscription but doesn't use Codex / Claude Code\nthemselves, you can borrow their session in seconds. **You never get their password, email login,\nor account access** — they simply authorise the coding tool in their own browser and a scoped\nOAuth token lands on your machine. Their ChatGPT/Claude conversations, account settings, and\ncredentials stay completely private.\n\n**One-time setup (you):** get a free [ngrok](https://ngrok.com) account and set your authtoken:\n```bash\nexport NGROK_AUTHTOKEN=your_token_here   # add to ~/.zshrc to make it permanent\n```\n\n**Every time:**\n1. In the TUI press **`r`** (or run `ccx codex remote` / `ccx claude remote`).  \n   A link is copied to your clipboard — send it to your friend on WhatsApp, iMessage, etc.\n2. Friend opens the link on any device. They see a 3-step guide that first explains exactly\n   what is shared (the coding-tool access only) and what stays private (chats, account, password):\n   - **Step 1** — tap “Authorise Codex / Claude Code Access” and sign in on the provider's own page\n   - **Step 2** — copy what the provider shows after signing in. The guide includes a screenshot\n     of exactly what to look for:\n\n     **Codex** — the browser lands on a `localhost:1455` error page; they copy the URL from the address bar:\n\n     ![Codex callback URL in the address bar](https://raw.githubusercontent.com/numandev1/claude-codex/main/assets/codex-callback.png)\n\n     **Claude** — Anthropic shows an Authentication Code page; they tap **Copy Code**:\n\n     ![Anthropic authentication code page](https://raw.githubusercontent.com/numandev1/claude-codex/main/assets/claude-auth-code.png)\n\n   - **Step 3** — paste it into the form on the guide page and hit Submit\n3. The token lands on **your** machine automatically. The session is saved and named after their email. Friend sees “✅ All done!” and closes the page.\n\n\u003e ⚠️ **A token grants full access to that account.** Share only over trusted channels.\n\n\u003e ⚠️ **One live session per account:** the provider ends the previous session when the *same*\n\u003e account signs in again elsewhere. If a borrowed session shows “session ended,” re-run\n\u003e `get-session` or ask your friend to use `remote` again. Different accounts coexist fine.\n\n## Borrowing a session the manual way (no ngrok)\n\nIf you'd rather not use ngrok, you can still share sessions via token blobs:\n\n```bash\n# Friend runs:\nccx codex get-session            # browser login → prints a one-line token blob\n\n# You run:\nccx codex set alice              # reads from clipboard (or @file / piped stdin)\nccx codex use alice \u0026\u0026 codex\n```\n\nIn the TUI: press **c** on a session to copy its token, send it to your friend, they press **a**\nto paste and name it. Tokens are provider-tagged — a Codex token can't be imported into Claude.\n\n## How it works\n\n- **A session is a snapshot of the provider's live credentials**, stored under\n  `~/.claudecodex/\u003cprovider\u003e/` with `0600` permissions:\n  - **Codex** → `~/.codex/auth.json`\n  - **Claude Code** → the `Claude Code-credentials` entry (macOS Keychain)\n- **Switching** restores a snapshot over the live credentials. The outgoing session is re-synced\n  first, so rotated refresh tokens are never lost.\n- **Switching mid-session: Claude Code hot-swaps, Codex needs a restart.** A running `claude`\n  session picks up the new account on its own. Codex loads `auth.json` once at startup and keeps\n  it in memory ([openai/codex#17041](https://github.com/openai/codex/issues/17041)), so claudecodex\n  warns you when it detects running `codex` processes after a switch. Your conversation isn't\n  lost: close the running Codex, switch, then pick the chat back up under the new account with\n  `codex resume --last`.\n- **Live limits, per account, without switching:**\n  - Codex → `chatgpt.com/backend-api/wham/usage` (`primary` = 5h, `secondary` = weekly)\n  - Claude → `api.anthropic.com/api/oauth/usage` (`five_hour` + `seven_day`)\n  - Expired access tokens are refreshed transparently via each provider's OAuth refresh grant.\n- **`best`** drops exhausted accounts (a window ≥ 99% used, reset-aware), then picks the most\n  5-hour headroom, tie-broken by weekly headroom.\n\nNothing leaves your machine except the authenticated usage requests to each provider's own API.\n\n## Configuration\n\n| Env var | Effect |\n|---|---|\n| `CLAUDECODEX_HOME` | Where sessions are stored (default `~/.claudecodex`) |\n| `CODEX_HOME` | Codex home (default `~/.codex`) |\n| `CLAUDECODEX_NO_UPDATE=1` | Disable the startup update check |\n\n## Develop\n\n```bash\ngit clone \u003crepo\u003e \u0026\u0026 cd claudecodex\nnpm install\nnpm run dev        # tsc --watch — rebuilds dist/ on every save\nnpm link           # exposes `claudecodex` and `ccx` globally from your checkout\n```\n\nBuilt with [Ink](https://github.com/vadimdemedes/ink). The dashboard is a pinned, live-updating\npanel (countdowns tick, rows re-sort by availability) — the same sticky-frame technique Claude\nCode uses.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumandev1%2Fclaude-codex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnumandev1%2Fclaude-codex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumandev1%2Fclaude-codex/lists"}