Codex Sign-In
Deputy Shell's guided sign-in path for Codex is "Sign in with ChatGPT" — a device-authorization flow that hands off to your browser. Advanced users can instead authenticate with their own OpenAI API key directly through the bundled Codex CLI.
Guided sign-in: Sign in with ChatGPT
- Starting sign-in shows a login link. Deputy Shell detects it and opens it automatically in your browser; if that doesn't happen, a tap-to-open option is shown instead.
- Complete the sign-in with your OpenAI account in the browser, the same way you would on desktop.
- Return to Deputy Shell — the session reflects that you're signed in once the browser flow completes.
This flow requires your own eligible OpenAI account, and a working network connection to reach OpenAI's sign-in servers.
Before your first sign-in, Deputy Shell shows a disclosure explaining what information may be sent to OpenAI as part of using Codex. Read it before continuing.
Manual API-key login through Codex CLI
Available through Codex CLI, with manual setup. End-to-end verified on the current release-candidate runtime. Deputy Shell's guided sign-in uses ChatGPT/device authentication. Advanced users can instead authenticate with their own OpenAI API key through the bundled Codex CLI. Deputy Shell does not currently provide a dedicated API-key settings screen for this — it's a terminal command sequence, not a tap-to-use option.
The bundled Codex CLI accepts the key on standard input, not as a command-line argument, so it needs to be piped in:
export OPENAI_API_KEY="your-api-key"
printenv OPENAI_API_KEY | codex login --with-api-key
unset OPENAI_API_KEY
codex login status
codex
- Set the environment variable with your key.
- Pipe it into
codex login --with-api-key. - Remove it from the environment immediately.
- Confirm with
codex login status, then start Codex.
OpenAI API usage is billed separately from ChatGPT subscriptions — check your OpenAI account's own billing before relying on this route.
Typing the key directly (for example, in an export command) can leave it visible in retained terminal text or shell history. Avoid screenshots or sharing terminal output while it's visible, and unset the variable immediately after signing in.
Never save the key in a project's .env file, a script, or anything you might later export or share — workspace export's exclusion rules reduce but do not eliminate the risk of a saved key leaking.
Deputy Shell does not provide, manage, or bill for your API key. This authentication route is supplied by the bundled Codex CLI itself, not by a Deputy Shell feature.
Deputy Shell
Join Closed Alpha