codex-auth CLI

A Zig utility for switching Codex accounts: importing an auth file, listing, switching, for the CLI, VS Code and the app

Install in Codex

Other ways to install

Access and checks

How we review

Broad access. The tool can change data, run commands or handle secrets.

  • Reads and changes Codex auth files with access tokens
  • A wrong switch can leave the wrong account active

This is third-party code. Review the repository files before installing.

What it does

codex-auth switches Codex accounts: it imports an auth file or CLIProxyAPI tokens (`import <path> [--alias]`), shows the list and changes the active account. It works with Codex CLI, the VS Code extension and the Codex app. After switching the client must be restarted: the `codext` fork switches without a restart and installs with `npm i -g @loongphy/codext`. The mode for the Codex app (`codex-auth app`) is unstable per the README. Install with `npm install -g @loongphy/codex-auth` or run through `npx @loongphy/codex-auth list`.

Who it is for. For people who have a personal and a work Codex account and are tired of changing the auth file by hand.

Good fit when

  • You need to switch quickly between a personal and a work Codex account
  • You need to keep several authorizations under short aliases
  • You need to switch the account without editing files by hand

Not a fit when

  • You want to get around limits or the terms of the service: the utility is not meant for that and responsibility lies with the user
  • You are not ready to trust a utility with files that hold access tokens

Example request

Show the list of saved Codex accounts and switch the active one to the work one by the alias work

Limitations

The utility reads and changes Codex auth files, that is access tokens, so it needs full access to those files. Switching several accounts is meant for a personal and a work account. Getting around limits and service terms is not allowed and responsibility lies with the user. After switching the client must be restarted unless you use the codext fork. The mode for the Codex app is unstable per the README. The latest release is v0.3.0 from 15.09.2026.

How to disable. Remove the package with npm uninstall -g @loongphy/codex-auth and check which auth file remains active in the Codex folder.

FAQ

What does codex-auth do?

It switches Codex accounts: imports an auth file, shows the list and changes the active account.

Which clients does it work with?

Codex CLI, the VS Code extension and the Codex app. After switching the client must be restarted.

What is codext?

A fork that switches the account without a restart: npm i -g @loongphy/codext.

Can I get around limits?

No. The utility is meant for a personal and a work account and service terms must not be broken.

How do I install codex-auth?

Run npx skillfoxx add cli/codex-auth in a terminal.

Is codex-auth safe to install?

Broad access. The tool can change data, run commands or handle secrets.

Discussion

No questions or reviews yet.

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
codex-auth (this card)no2,891
codex-provider-syncno3,652aligns old Codex sessions after a provider change
CodexPrononot required2,108a local MCP giving ChatGPT access to repositories through a tunnel

README in short

The README describes a Zig utility for switching Codex accounts: npm installation, import, list and switch commands, the codext fork without a restart and the unstable app mode. MIT license.

README badge

Report a problem