CodexUse CLI for terminal power users
I wanted a zero-UI way to switch Codex accounts on a laptop and over SSH. The CodexUse CLI now covers profile workflows, Accounts Pool control, and a headless daemon without opening the desktop app.
When the CLI shines
- Switching accounts during multi-client work.
- Refreshing an expired login from an SSH session.
- Listing profiles fast without loading a UI.
Install
Install the CLI manually with npm, then verify it is on your PATH.
Core workflows
List profiles
codexuse profile list
codexuse profile list --compact
codexuse profile list --no-usage
Add or refresh login
codexuse profile add Work --login=device
codexuse profile refresh Work --login=browser
Switch accounts
codexuse profile switch Personal
Licenses in the terminal
codexuse license status
codexuse license activate <license-key>
Manage Accounts Pool from the terminal Pro
If another app should call one pooled local API, you can configure and inspect that pool from the CLI too:
codexuse account-pool status
codexuse account-pool enable
codexuse account-pool profiles list
codexuse account-pool keys create
codexuse account-pool keys create --runtime=daemon
codexuse account-pool status --runtime=daemon --port=3773
Desktop and daemon share the same Accounts Pool settings on one machine, but daemon keys and sessions live in the daemon runtime store. If a client will hit the daemon URL, create that key with --runtime=daemon.
Run it headless
On a VPS or SSH session, start the bundled daemon and pin the port if another local client needs one stable Accounts Pool URL. Keep Bun on PATH because the daemon runs CodexUse's bundled Projects server on Bun:
codexuse daemon start --port=3773
codexuse daemon start --port=3773 --telegram-bot-token=123456:AA...
Telegram is optional. Add the bot token only when you want remote control from your phone.
Move your setup to another machine Pro
If your primary setup is on one device, pull it onto another (for example, Linux over SSH) with cloud sync:
# on second machine
codexuse sync status
codexuse sync pull
codexuse profile list --compact
What to avoid
- Running
profile addwithout Codex CLI installed. - Using multiple profiles for the same OpenAI account (shares rate limits).
- Assuming CLI installs are Windows-ready (Windows is not supported yet).
Related
Do I need the desktop app to use the CLI?
You can install the CLI via npm, but the desktop app gives the easiest PATH install and profile UI.
Does the CLI require API keys?
No. It uses the same OAuth login flow as the Codex CLI.
Will the CLI read my rate limits?
Yes, unless you pass --no-usage. Live usage requires Codex CLI to be reachable.
Can I pull my setup from another machine?
Yes. With Pro cloud sync, push from your main machine, then run codexuse sync pull on the second machine to load profiles, config.toml, and app settings.