Codex CLI
Run Codex CLI with an OpenAI API key stored in your browser.
Codex CLI is installed the first time you open it. Later launches start immediately.
Signing in
Codex requires an OpenAI API key. Signing in with a ChatGPT account does not work in the sandbox, so BrowserCode asks for a key before Codex starts.
Codex's own login screen does not appear. BrowserCode configures Codex with a provider that reads the key from the environment, because the built-in provider shows the login screen even when a key is set.
To create a key, go to platform.openai.com/api-keys and select Create new secret key. Paste the key into the panel in BrowserCode.
The key is stored in your browser and sent to OpenAI when Codex runs. It is not stored on our servers. API usage is billed per token to your OpenAI account and is not covered by a ChatGPT subscription.
Changing or removing the key
To change the key, select the key button in the bottom-left corner of the terminal. BrowserCode saves the new key and restarts Codex.
To remove the key, clear site data for browsercode.io. To make sure the key can no longer be used, also revoke it in the OpenAI dashboard.