Use your ChatGPT subscription with Mandri from the terminal
Connect your ChatGPT account through the Mandri CLI, then launch Codex with a model from that account. You need ChatGPT access to Codex. Your plan’s access and usage limits apply; API billing is separate. See the OpenAI authentication guide.
Sign in to ChatGPT
Section titled “Sign in to ChatGPT”mandri provider add chatgpt --kind chatgptMandri opens your browser and displays an authorization link in the terminal. Sign in and authorize the connection, then return to the terminal. No API key is required. Mandri creates its own session without changing an existing Codex CLI or IDE sign-in.
If the browser cannot open automatically, open the displayed link yourself. If the automatic return fails, the CLI lets you paste the complete redirect URL into its interactive prompt. Keep that address within your active sign-in flow.
The command reports chatgpt chatgpt verified when registration completes. For another account, use a different provider name with --kind chatgpt.
Select a model and launch Codex
Section titled “Select a model and launch Codex”mandri provider models chatgptCopy a model ID from the catalog. Replace <model-id> below, then run from your project folder:
mandri run --model "chatgpt/<model-id>" codexCodex is included with Mandri. Enter your request when its terminal interface opens and respond to its approval prompts. Review its file changes before keeping them.
If setup fails
Section titled “If setup fails”The sign-in link expires: run the add command again to start a new sign-in.
The provider name is already used: choose another name for the connection. Use that name in both the model-list command and the model reference.
The model request is refused: check your account’s access and usage limits. The catalog lists models; it does not verify access to every request.
For the graphical interface, see Use your ChatGPT subscription in the app.