Guides

Set Up Terminal AI

4 min read
Claude Code started in the terminal tab of the AI sidebar, reading a CSV from the open folder

Run Claude Code in Ritemark's built-in terminal, next to the document it edits. ChatGPT and Claude also work in the AI sidebar with no install.

To run Claude Code in a terminal next to your documents, open the terminal in Ritemark (View, then Terminal), go to your document folder and type claude. Claude Code then reads and edits the files in that folder, and the document it changes stays open in the editor beside it, so you see each edit as it lands. You need a paid Claude plan. Ritemark turns a folder on your computer into a workspace where ChatGPT or Claude work with you, and its AI sidebar runs them with no install. Pick the terminal if you already use command-line tools.

To run Claude in a terminal, install Claude Code with npm, open the terminal in Ritemark, go to your document folder and type claude. The steps for each tool are below. If you would rather not install anything, the AI sidebar already has Claude Code, Codex and OpenCode built in.


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: View → Terminal 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 any ChatGPT plan; the free one has tighter limits. Available on macOS and Linux, with experimental Windows support.

Read more: OpenAI Codex CLI →

Using with Ritemark

  1. Open the terminal in Ritemark: View → Terminal 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: View → Terminal 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 Any ChatGPT plan; Free has tighter limits
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"