Astronaut with laptop Astronaut
April 25, 2026
today

I built a Codex CLI account switcher

A small helper to switch between multiple Codex CLI accounts without constantly logging in and out.

I built a small helper called codex-account-switch because I kept running into the same annoying workflow problem: using multiple Codex CLI accounts meant constantly swapping ~/.codex/auth.json around or logging in again.

So I made the boring version of the fix:

  • save multiple Codex logins under names
  • switch accounts with one command
  • keep the rest of ~/.codex untouched
  • show live usage and the next reset time
  • collapse free-tier accounts to a simple free plan output

It ended up being a pretty nice little Unix-style tool:

Terminal window
codex-account-switch save main
codex-account-switch work
codex-account-switch list

I also cleaned up the install flow so there is now:

  • a standard make install
  • a one-command installer
  • a first tagged release

Project:

Install:

Terminal window
curl -fsSL https://raw.githubusercontent.com/MaximilianMauroner/codex-acc-sw/main/install.sh | bash

This is one of those tiny tools that probably should not have to exist, but until Codex CLI has native multi-account support, it is useful enough that I wanted it around.