AI CLI Setup Guide
This guide covers the installation of AI CLI tools required for the AI Comments feature.
Quick Start
Most users should install Claude Code - it has the easiest setup and includes web search capabilities needed for Fact Check and Glossary features.
Supported AI CLI Tools
| Tool | Provider | Best For | Web Search |
|---|---|---|---|
| Claude Code | Anthropic | General analysis, research | Yes |
| Gemini CLI | Fast responses | No | |
| Codex | OpenAI | Code-related content | Yes |
Claude Code (Recommended)
Claude Code is Anthropic's official CLI tool with built-in web search capabilities.
- Official Page: claude.com/product/claude-code
- Documentation: code.claude.com/docs
macOS / Linux
# Install with official script
curl -fsSL https://claude.ai/install.sh | bashAfter installation:
- Open a new terminal window
- Run
claudeto start authentication - Log in with your Anthropic account
Verify installation:
claude --versionWindows
Open PowerShell and run:
# Install with official script
irm https://claude.ai/install.ps1 | iexAfter installation:
- Restart PowerShell
- Run
claudeto start authentication - Log in with your Anthropic account
Verify installation:
claude --versionAlternative Installation Methods
- npm:
npm install -g @anthropic-ai/claude-code(requires Node.js 18+) - WSL: Use the Linux installation method inside WSL
See official documentation for detailed instructions.
Troubleshooting
If claude command is not found after installation:
- Restart terminal/PowerShell
- Verify the installation path is in your PATH environment variable
- See official documentation for system requirements
Gemini CLI
Google's Gemini CLI for fast AI responses.
- Repository: github.com/google-gemini/gemini-cli
macOS / Linux
# Install with npm (Node.js 18+ required)
npm install -g @google/gemini-cli
# Or install with Homebrew
brew install gemini-cliAuthenticate:
gemini authVerify installation:
gemini --versionWindows
# Install with npm (Node.js 18+ required)
npm install -g @google/gemini-cliAuthenticate:
gemini authVerify installation:
gemini --versionCodex (OpenAI)
OpenAI's Codex CLI, particularly good for technical content.
- Repository: github.com/openai/codex
macOS / Linux
# Install with npm (Node.js 18+ required)
npm install -g @openai/codex
# Set OpenAI API key
export OPENAI_API_KEY="your-api-key"Verify installation:
codex --versionWindows
# Install with npm (Node.js 18+ required)
npm install -g @openai/codex
# Set OpenAI API key (permanent)
[Environment]::SetEnvironmentVariable("OPENAI_API_KEY", "your-api-key", "User")
# Restart PowerShell after setting environment variableVerify installation:
codex --versionVerifying Setup in Social Archiver
After installing at least one AI CLI tool:
- Restart Obsidian - Required to detect newly installed CLI tools
- Open Timeline View - Navigate to any archived post
- Look for AI Comment banner - Should appear below archived posts
- Check Settings - Go to Settings > Social Archiver > AI Comments to configure defaults
Detection Issues
If the AI Comment banner doesn't appear:
- Verify CLI installation with version command
- Ensure CLI is authenticated
- Check that the CLI is in your system PATH
- Restart Obsidian completely (not just reload)
Next Steps
Once your AI CLI is set up, learn how to use AI Comments:
AI Comments Guide - Learn about comment types, settings, and best practices.