1
Add a nemonist provider
Add a nemonist provider to your Codex config,
~/.codex/config.toml:2
Put your key in your shell profile
3
Start Codex
Start
codex in your project. Change models with model in the config, or codex -m <model>.Codex in the ChatGPT desktop app
The desktop app reads the same~/.codex/config.toml, but it does not read your shell profile, so it never sees a key you export there.
1
Give the app your key
On macOS, run this, then fully quit and reopen the app:This is cleared when you log out or restart, so run it again after that. On Windows, run
setx NEMONIST_API_KEY "sk-nm-..." once, then reopen the app.2
If a change seems ignored
The app can leave background processes running after you quit, and they keep the old key and config. Quit the app, end any leftover ChatGPT or Codex processes from OpenAI in Activity Monitor (macOS) or Task Manager (Windows), then reopen it. Logging out and back in also works; on macOS run
launchctl setenv again first.