📈 GH Trending Explorer 🎲 Surprise me

← all repos

Loongphy / codex-auth

git clone https://github.com/Loongphy/codex-auth.git v0.3.1 · 14d ago 🔥 on GitHub Trending today

A CLI tool to switch and manage Codex accounts

+7
stars, 24h · #392
—
stars, 7 days
—
stars, 30 days
2.8k
★ total
165
forks · 40 open issues

Star history starts 2026-10-20; the chart appears after the second daily snapshot.

LanguageZig
LicenseMIT
Created2026-02-10 (8mo ago)
Last push4d ago
Watchers4
OwnerUser

Seen on GitHub Trending

  • 2026-10-20 — #11 daily in zig · +7 ★

GitHub topics

Links

README excerpt
# Codex Auth 
`codex-auth` is a command-line tool for switching Codex accounts.
## Install
Install with npm:
 [code] 
You can also run it without a global install:
 [code] 
## Supported Platforms
`codex-auth` works with these Codex clients:
- Codex CLI
- VS Code extension
- Codex App
> [!IMPORTANT]
> For **Codex CLI** and **Codex App** users, switch accounts, then restart the client for the new account to take effect.
>
> If you want seamless automatic account switching without restarting, use the forked `codext`, an enhanced Codex CLI.
>
> Install it with `npm i -g @loongphy/codext` and run `codext`.
>
> Codex App users can use `codex-auth app`, but it is not stable. See Details.
Install the Codex CLI even if you mainly use the VS Code extension or the App, because it makes adding accounts easier:
 [code] 
After that, you can use `codex-auth login`, or `codex-auth login --device-auth` to sign in and add accounts more easily.
## Commands
Detailed command documentation lives in docs/commands/README.md.
### Account Management
| Command | Description |
|---------|-------------|
| [`codex-auth list [--live] [--active] [--api\|--skip-api]`](./docs/commands/list.md) | List stored accounts and usage state |
| [`codex-auth login [--device-auth]`](./docs/commands/login.md) | Run `codex login`, then add the current account |
| [`codex-auth switch [--live] [--api\|--skip-api]`](./docs/commands/switch.md) | Switch the active account interactively |
| `codex-auth switch ` | Switch directly by row number or account selector |
| [`codex-auth remove [--live] [--api\|--skip-api]`](./docs/commands/remove.md) | Remove accounts interactively |
| [`codex-auth remove [ ...]`](./docs/commands/remove.md) | Remove accounts by selector |
| `codex-auth remove --all` | Remove all stored accounts |
| `codex-auth alias set ` | Set an alias for an account |
| `codex-auth alias clear ` | Clear the alias for an account |
### Import and Maintenance
| Command | Description |
|---------|-------------|
| [`codex-auth import [--alias ]`](./docs/commands/import.md) | Import a single auth file or batch import a folder |
| [`codex-auth import --cpa [ ]`](./docs/commands/import.md) | Import CLIProxyAPI token JSON |
| [`codex-auth import --purge [ ]`](./docs/commands/import.md) | Rebuild `registry.json` from auth files |
| [`codex-auth export [ ]`](./docs/commands/export.md) | Export stored account auth files |
| [`codex-auth export --cpa [ ]`](./docs/commands/export.md) | Export CLIProxyAPI token JSON |
| `codex-auth clean` | Delete managed backup and stale account files |
### Configuration
| Command | Description |
|---------|-------------|
| `codex-auth config live --interval ` | Configure live TUI refresh interval |
## Quick Examples
 [code] 
## Codex App
> [!IMPORTANT]
> The `app` command is **experimental** and may never become a stable feature.
>
> It is designed to enable seamless account switching without restarting the Codex App. By leveraging the `CODEX_CLI_PATH` environment va