Skip to main content

Overview

Jean supports three CLI backends for AI interaction. This reference covers installation, authentication, configuration, and command-line usage for each.

Claude CLI

Installation

macOS (Homebrew):
Manual download:
  • Visit the Claude CLI GitHub repository
  • Download the binary for your platform
  • Add to PATH
Verify installation:

Authentication

API Key method:

Configuration

Global settings: ~/.claude/settings.json
Project settings: .claude/settings.json in project root
MCP servers: ~/.claude.json (global) or .mcp.json (project)

Command-Line Usage

Basic chat:
Model selection:
Thinking levels:
Effort levels (Opus 4.6):
MCP config:
JSON schema output:

Environment Variables

Status Interface

Codex CLI

Installation

Via installer (recommended): Via npm (if available):
Verify installation:

Authentication

API Key method:

Configuration

Global config: ~/.codex/config.toml
Project config: .codex/config.toml in project root

Command-Line Usage

Basic chat:
Model selection:
Reasoning effort:
Multi-agent mode (experimental):
MCP config:

Environment Variables

Status Interface

OpenCode

Installation

Via npm:
Via binary release: Verify installation:

Authentication

OpenCode supports multiple providers: Anthropic:
OpenAI:
OpenRouter:
Local models (Ollama):

Configuration

Global config: ~/.config/opencode/opencode.json
Project config: opencode.json in project root

Command-Line Usage

Basic chat:
Model selection:
Provider override:
MCP config:

Environment Variables

Status Interface

Backend Detection

Jean detects backends by checking:
  1. System PATH: which claude, which codex, which opencode
  2. Common locations:
    • macOS: /usr/local/bin/, /opt/homebrew/bin/
    • Linux: /usr/bin/, /usr/local/bin/, ~/.local/bin/
    • Windows: %ProgramFiles%, %LocalAppData%, %AppData%
  3. Platform-specific:
    • macOS: Checks Homebrew installation paths
    • Windows: Checks registry keys
    • Linux: Checks XDG directories

Version Requirements

Checking version:

Updating Backends

Claude CLI:
Codex CLI:
OpenCode:

Troubleshooting

Backend Not Detected

  1. Verify installation: Run claude --version in terminal
  2. Check PATH: echo $PATH (Unix) or echo %PATH% (Windows)
  3. Reinstall via Jean UI: Preferences > Backends > Install
  4. Restart Jean after installation

Authentication Fails

  1. Run [backend] auth in terminal
  2. Follow interactive prompts
  3. Verify with [backend] auth status
  4. Check API key is valid (not expired/revoked)
  5. Restart Jean

Command Not Found

Solution: Add CLI to PATH:

Permission Denied

Solution:

MCP Servers Not Loading

  1. Check config file syntax (JSON/TOML)
  2. Verify file location matches backend:
    • Claude: .claude.json or .mcp.json
    • Codex: config.toml
    • OpenCode: opencode.json
  3. Test MCP server manually:
  4. Check logs: Help > Open Logs Folder

Jean-Specific Integration

Jean wraps CLI backends with additional functionality:

Features

  • Persistent sessions: Chat history saved across restarts
  • UI integration: Model/backend selection via dropdowns
  • Event streaming: Real-time message updates
  • Error handling: User-friendly error messages
  • Process management: Automatic cleanup on session close

Command Invocation

Jean constructs CLI commands based on session settings: Claude example:
Codex example:
OpenCode example:

Process Lifecycle

  1. Spawn: Jean spawns CLI as child process
  2. Stream: STDOUT streamed to UI in real-time
  3. Parse: JSON stream parsed for structured output
  4. Store: Messages saved to session database
  5. Cleanup: Process killed on session close or cancel

Error Handling

Common exit codes:
  • 1 - General error
  • 2 - Authentication failed
  • 3 - API rate limit
  • 130 - Process interrupted (Ctrl+C)

Custom Providers (Claude CLI)

Jean supports custom provider profiles for Claude CLI:

Profile Structure

Example Profiles

See “Multi-Backend Setup” guide for predefined profiles (OpenRouter, MiniMax, Z.ai, Moonshot).

Creating Profiles

  1. Preferences > Advanced > CLI Profiles
  2. Add new profile
  3. Configure environment variables
  4. Save and select from provider dropdown