opencode-codex-account-switcher
v0.1.0
Published
TUI plugin for switching saved Codex ChatGPT logins in opencode
Readme
opencode-codex-account-switcher
TUI plugin for saving and switching multiple Codex ChatGPT logins in opencode.
Install
opencode plugin -g opencode-codex-account-switcherRestart the TUI after installation, then open the command palette and run Codex Accounts.
For local development, install with an absolute package path:
opencode plugin -g "/path/to/opencode/packages/codex-account-switcher"Usage
Use opencode's built-in login flow for the account you want to save:
opencode auth login --provider openaiThen open the TUI and run Codex Accounts: Save Current Login.
Repeat that login-and-save flow for each ChatGPT account. After that, use
Codex Accounts: Switch Account to switch the active openai credential.
The switcher opens immediately and refreshes each saved account with remaining
5-hour and week limits in the background.
Run Codex Accounts: Show Usage to view a detailed usage snapshot with reset
times and credits for all saved accounts.
Security
Saved profiles contain Codex OAuth access and refresh tokens. They are stored
locally next to opencode's auth data with file mode 0600, and are not included
in the npm package.
Publish
Run bun run build before publishing. The package export points at dist/tui.js.
