Guides

Set Up Terminal AI

4 min read
Set Up Terminal AI

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 is the best terminal AI for writing with RiteMark. It understands markdown, makes precise edits, and handles long documents well.

Install Claude Code CLI

  1. Install via npm (requires Node.js 18+):

    npm install -g @anthropic-ai/claude-code
    
  2. Start Claude Code:

    claude
    

    The 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

  1. Open your document in RiteMark

  2. Open the terminal: ViewTerminal or `Ctrl+``

  3. Navigate to your document folder:

    cd /path/to/your/documents
    
  4. Start Claude:

    claude
    
  5. 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

  1. Install Codex CLI (requires Node.js 18+):

    npm install -g @openai/codex
    
  2. Start Codex:

    codex
    

    Select "Sign in with ChatGPT" to authenticate. Works with ChatGPT Plus, Pro, Team, or Enterprise plans. Available on macOS and Linux, with experimental Windows support.

Read more: OpenAI Codex CLI →

Using with RiteMark

  1. Open the terminal in RiteMark: ViewTerminal or `Ctrl+``

  2. Navigate to your document folder and run codex

  3. 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

  1. Install Gemini CLI (requires Node.js 20+):

    npm install -g @google/gemini-cli
    
  2. Start Gemini:

    gemini
    

    Sign 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

  1. Open the terminal in RiteMark: ViewTerminal or `Ctrl+``

  2. Navigate to your document folder and run gemini

  3. Ask Gemini to help with your documents, similar to the Claude Code examples above


Tips for All Terminal AIs

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:

  1. "Improve the opening paragraph"

  2. "Now make section 2 clearer"

  3. "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 claude again to re-authenticate

  • OpenAI: Run codex and sign in again with ChatGPT

  • Gemini: Run gemini and 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

  1. RiteMark should auto-detect file changes

  2. If not, reload: Cmd+Shift+P → "Reload Window"


Set Up Terminal AI