
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 CLI
-
Install via npm (requires Node.js 18+):
npm install -g @anthropic-ai/claude-code -
Start Claude Code:
claudeThe first time you run it, Claude Code opens your browser to sign in with your Anthropic account. You need a Claude Pro ($20/month) or higher plan.
Read more: Claude Code Quickstart →
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 CLI
Good for technical documentation and code-related writing.
Install
-
Install Codex CLI (requires Node.js 18+):
npm install -g @openai/codex -
Start Codex:
codexSelect "Sign in with ChatGPT" to authenticate. Works with ChatGPT Plus, Pro, Team, or Enterprise plans. Available on macOS and Linux, with experimental Windows support.
Using with RiteMark
-
Open the terminal in RiteMark: View → Terminal or `Ctrl+``
-
Navigate to your document folder and run
codex -
Ask Codex to help with your documents, similar to the Claude Code examples above
Google Gemini CLI
Fast for quick edits and brainstorming. Open-source and free to use.
Install
-
Install Gemini CLI (requires Node.js 20+):
npm install -g @google/gemini-cli -
Start Gemini:
geminiSign in with your Google account. The free tier gives you 60 requests per minute and 1,000 requests per day with no API key needed.
Read more: Gemini CLI Documentation →
Using with RiteMark
-
Open the terminal in RiteMark: View → Terminal or `Ctrl+``
-
Navigate to your document folder and run
gemini -
Ask Gemini to help with your documents, similar to the Claude Code examples above
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 | Cost |
|---|---|---|---|
| Claude Code | Context understanding, nuanced writing, markdown expertise | Most writing tasks | Claude Pro $20/mo |
| OpenAI Codex | Technical accuracy, code integration | Technical docs | ChatGPT Plus $20/mo |
| Google Gemini | Speed, large context window, open-source | Brainstorming, drafts | Free tier available |
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: Run
claudeagain to re-authenticate -
OpenAI: Run
codexand sign in again with ChatGPT -
Gemini: Run
geminiand sign in again with Google
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