Codex is OpenAI's coding agent CLI that works with your ChatGPT account. Ritemark integrates Codex directly into its AI sidebar -- pick a Codex model in the model menu under the message box and start working. Codex ships inside Ritemark, so you only need to sign in.
As of v1.7.0, Codex is a stable agent in Ritemark, no longer flagged as experimental. The compatibility probe now tries both argv shapes, so the spurious "Some agent features are unavailable" banner that some users saw is gone.
What Do You Need Before Installing?
You need a ChatGPT account. OpenAI includes Codex in every ChatGPT plan, the free one with tighter limits. Codex usage is included in your plan at no additional API cost.
Codex ships inside Ritemark, so you do not need Node.js or a separate install.
How Do You Install Codex CLI?
Option 1: Ritemark's Built-in Setup (Recommended)
Open the AI sidebar in Ritemark. The first time, it opens on a welcome screen with Sign in with ChatGPT; if another agent is already set up, pick a Codex model in the model menu under the message box. Codex ships inside Ritemark, so the sidebar goes straight to sign-in:
- Click Sign in with ChatGPT
- Finish the sign-in in your browser
- Start chatting
You can also sign in from Settings -> ChatGPT Account. Settings and the sidebar stay in sync.
Option 2: Manual Installation
You only need a manual install to run codex in a terminal yourself, or to have Ritemark use your own copy (Settings -> Agent Runtime -> Runtime preference -> Use system install). This needs Node.js 18 or higher. Install Codex CLI from your terminal or Ritemark's built-in terminal:
npm install -g @openai/codex
After installation, run codex to authenticate:
codex
This opens your browser to sign in with your ChatGPT account. No API key is needed -- your ChatGPT plan covers Codex usage.
Verify the installation:
codex --version
You can also confirm your setup status in Settings -> ChatGPT Account. This section shows your authentication method, CLI version, and subscription status.
Choosing Bundled vs System Codex
As of v1.7.0, Runtime preference under Settings -> Agent Runtime decides which Codex Ritemark uses. The same setting applies to Claude Code:
- Bundled (the default, recommended) -- the Codex that ships with Ritemark.
- Use system install -- the
codexalready installed on your PATH, with the bundled copy as the fallback when none is found. Useful if you want a specific version or share one install across several tools.
Under Currently active, Settings shows which copy each agent runs: Bundled with app or System installation.
How Do You Use Codex in Ritemark?
From the AI Sidebar (Recommended)
Open the AI sidebar and pick a Codex model in the model menu under the message box. Type your request in the chat input. Codex reads your open document and folder and makes the changes you ask for. In Auto, the default, it edits directly. Choose Manual to approve each change, or Plan only to see the plan first.
From the Terminal
Open a folder with markdown files in Ritemark, then start Codex in the terminal:
codex "make this document more concise"
Try these examples:
codex "in notes.md, add a summary section at the top"
codex "reorganize proposal.md: move conclusions to the end, add an executive summary"
codex "review draft.md and improve the writing style"
What Can Codex Do With Your Documents?
Codex handles complex writing tasks by reading your files, understanding context, and making the edits you ask for.
Polish writing:
codex "review draft.md and improve the writing style. Make it more professional."
Expand content:
codex "in blog-post.md, expand the 'Benefits' section with 3 more bullet points"
Restructure documents:
codex "convert meeting-notes.md from paragraphs into a structured outline with headers"
Convert formats:
codex "convert notes.md into a blog post format with introduction and conclusion"
Translate:
codex "translate article.md to Estonian, save as article-et.md"
How Do You Get the Best Results?
Specific prompts produce better results than vague ones. Always reference the filename and describe the exact outcome you want.
| Instead of | Say |
|---|---|
| "improve this" | "make the introduction more engaging" |
| "fix it" | "fix the bullet point formatting in the Features section" |
| "make it better" | "simplify the language for a non-technical audience" |
Use Version Control as a Safety Net
Git lets you review AI changes and revert anything you do not like:
git commit -am "before AI edits"
# run codex commands
git diff # review changes
git commit -am "AI: improved writing" # or git checkout . to undo
How Much Does Codex Cost?
Codex usage is included in your ChatGPT plan. There are no additional API costs. OpenAI includes Codex in every ChatGPT plan, Free included. The free plan has the tightest limits and suits short tasks; paid plans such as Plus and Pro raise the limits. Check OpenAI's pricing page for the current plans.
You do not need a separate OpenAI API key or billing account.
Troubleshooting
"Command not found: codex"
This only affects a Codex you installed yourself for the terminal. Make sure Node.js is installed and the npm global bin directory is in your PATH. Reinstall if needed:
npm install -g @openai/codex
On macOS with nvm, ensure you are using the correct Node version:
nvm use 18
npm install -g @openai/codex
Node Architecture Mismatch on macOS
If you see unexpected errors on Apple Silicon Macs, check that Node.js is running natively:
node -p "process.arch"
This should show arm64. If it shows x64, you are running Node under Rosetta. Reinstall Node.js natively:
nvm uninstall 18
arch -arm64 nvm install 18
Authentication Issues
If OAuth sign-in does not complete, check that your browser opened the authentication page. Make sure you signed in with the ChatGPT account you meant to use.
Changes Not Appearing in Editor
Ritemark auto-reloads files within about 1 second. If changes do not appear, save the file manually with Cmd+S or reload the window with Cmd+Shift+P -> Reload Window.
Codex Not Ready in the Sidebar
Codex ships inside Ritemark. If the sidebar does not show Codex as ready, close and reopen the AI sidebar, or restart Ritemark. If Ritemark says the bundled Codex runtime is missing or could not start, reinstall Ritemark. Repair Codex repairs only a Codex you installed yourself, and for the bundled copy it tells you to reinstall. If you chose Use system install in Settings -> Agent Runtime, check that your own codex install works.
"Some agent features are unavailable" banner
This banner appeared in some versions before v1.7.0 because the compatibility probe only tried one argv shape. The probe now tries both shapes, so the banner is gone. Update to v1.7.0 or later and the false warning disappears.
Frequently Asked Questions
How do I install Codex CLI?
You don't need to. Codex ships inside Ritemark: pick it in the AI sidebar and sign in with ChatGPT. Install the CLI yourself only to run codex in the terminal or to have Ritemark use it (Use system install in Settings -> Agent Runtime). For that, run npm install -g @openai/codex (Node.js 18+ required), then run codex to sign in with your ChatGPT account.
Do I need an OpenAI API key for Codex?
No. Codex CLI authenticates with your ChatGPT account via OAuth. Your ChatGPT plan covers usage. No separate API key or billing setup is required.
Does Codex edit files automatically?
In Ritemark it depends on the mode. Auto, the default, lets Codex edit files directly. Manual asks before each file write or command, and Plan only shows a plan before anything changes.
How do I update Codex CLI?
The Codex inside Ritemark is updated with Ritemark itself. If you installed your own copy, run npm update -g @openai/codex in the terminal to get the latest version.
Can Codex work on multiple files at once?
Yes. Codex reads and edits multiple files in your working directory in a single session. It handles batch operations like translating all markdown files in a folder.
What is the difference between Codex and Claude Code?
Both are terminal-based AI agents that read and edit files on your computer. Codex is made by OpenAI and uses GPT models. Claude Code is made by Anthropic and uses Claude models. Ritemark supports both -- pick the one that fits your workflow or subscription.
Does Codex work on Windows?
Yes. Codex ships inside Ritemark on Windows too: pick it in the AI sidebar and sign in with ChatGPT. To run it in a terminal yourself, install it via npm install -g @openai/codex in PowerShell.
Does Codex work with languages other than English?
Yes. Codex handles content in any language. You can write prompts in English or your native language, and it can translate between languages while preserving markdown formatting.
Does Ritemark have a setup wizard for Codex?
Yes. Open the AI sidebar and pick a Codex model in the model menu under the message box. Codex ships inside Ritemark, so the sidebar goes straight to sign-in with ChatGPT. If something needs fixing, the sidebar tells you what to do.
Related
- How to Set Up Claude Code - Alternative AI agent setup
- Why Does Ritemark Use Terminal AI Agents? - How CLI agents work with Ritemark
- AI Assistant - Built-in chat sidebar
- Getting Started - Ritemark basics