
Set Up Terminal AI
Get Claude Code, OpenAI Codex, or Google Gemini working with RiteMark.
Terminal-based AIs work alongside RiteMark to help you write. They can read your documents, make edits, and understand your full project context.
Claude Code (Recommended)
Claude Code is the best terminal AI for writing with RiteMark. It understands markdown, makes precise edits, and handles long documents well.
Install Claude Code
-
Install via Homebrew:
brew install claude-code -
Or via npm:
npm install -g @anthropic-ai/claude-code -
Authenticate:
claude authFollow the prompts to sign in with your Anthropic account.
Using Claude Code with RiteMark
- Open your document in RiteMark
- Open the terminal: View → Terminal or `Ctrl+``
- Navigate to your document folder:
cd /path/to/your/documents - Start Claude:
claude - Ask Claude to help:
Read my-document.md and suggest improvements
Example Prompts
- "Make the introduction more engaging"
- "Restructure this document with better headings"
- "Summarize the key points at the top"
- "Make section 3 more concise"
- "Add examples to illustrate each concept"
OpenAI Codex
Good for technical documentation and code-related writing.
Install
-
Install OpenAI CLI:
pip install openai -
Set API key:
export OPENAI_API_KEY='your-key-here'Or add to your shell profile (~/.zshrc):
echo 'export OPENAI_API_KEY="your-key"' >> ~/.zshrc
Using with RiteMark
Codex CLI usage varies by tool. Refer to OpenAI documentation for current CLI options.
Google Gemini
Fast for quick edits and brainstorming.
Install
-
Install Gemini CLI:
pip install google-generativeai -
Configure API key:
export GOOGLE_API_KEY='your-key-here'
Using with RiteMark
Refer to Google's Gemini CLI documentation for current usage.
Tips for All Terminal AIs
Navigate to Your Files First
Always start in the right directory:
cd ~/Documents/my-project
This helps the AI understand your project structure.
Be Specific About Files
Tell the AI which file to work on:
- "Edit introduction.md"
- "Read chapters/chapter-1.md and improve it"
Work Section by Section
Don't ask for everything at once:
- "Improve the opening paragraph"
- "Now make section 2 clearer"
- "Add a conclusion"
Give Context
Tell the AI what you're writing:
- "This is a blog post for developers"
- "This is a user manual for beginners"
- "This is a sales proposal"
Comparison
| AI | Strengths | Best For |
|---|---|---|
| Claude Code | Context understanding, nuanced writing, markdown expertise | Most writing tasks |
| OpenAI Codex | Technical accuracy, code integration | Technical docs |
| Google Gemini | Speed, quick iterations | Brainstorming, drafts |
Troubleshooting
"Command not found"
The AI CLI isn't installed or isn't in your PATH. Reinstall following the instructions above.
Authentication errors
Re-authenticate with your API provider:
- Claude:
claude auth - OpenAI: Check your API key
- Gemini: Check your API key
AI can't see my file
Make sure you're in the correct directory:
pwd # shows current directory
ls # lists files here
Changes don't appear in RiteMark
- RiteMark should auto-detect file changes
- If not, reload: Cmd+Shift+P → "Reload Window"
Related
- Terminal AI Feature - How terminal AI integration works
- AI Assistant - Built-in AI sidebar
- Set Up Built-in AI - Configure the sidebar AI