Backends¶
clinvk supports multiple AI CLI backends, each with unique strengths and characteristics.
Supported Backends¶
- Claude Code - Anthropic's AI coding assistant with deep reasoning capabilities
- Codex CLI - OpenAI's code-focused CLI tool optimized for code generation
- Gemini CLI - Google's Gemini AI with broad knowledge and capabilities
Backend Comparison¶
| Feature | Claude Code | Codex CLI | Gemini CLI |
|---|---|---|---|
| Binary | claude |
codex |
gemini |
| Default Model | Backend default (or config override) | Backend default (or config override) | Backend default (or config override) |
| Session Resume | --resume |
codex exec resume |
--resume |
| Strengths | Complex reasoning, safety | Code generation | Broad knowledge |
Backend Detection¶
clinvk automatically detects available backends by checking for their binaries in your PATH:
Output includes backend availability summary:
Default Backend: claude
Backends:
claude:
model: claude-opus-4-5-20251101
codex:
model: o3
gemini:
model: gemini-2.5-pro
Available backends:
claude: available
codex: not installed
gemini: available
Selecting Backends¶
Via CLI¶
Via Configuration¶
Set a default backend in ~/.clinvk/config.yaml:
Via Environment Variable¶
Backend-Specific Options¶
Each backend supports the unified options, plus its own specific flags:
Unified Options¶
These work across all backends:
| Option | Description |
|---|---|
model |
Model to use |
approval_mode |
Approval behavior |
sandbox_mode |
File access permissions |
max_turns |
Maximum agentic turns |
max_tokens |
Maximum response tokens |
Backend-Specific Flags¶
Pass additional flags via extra_flags in config:
backends:
claude:
extra_flags: ["--add-dir", "./docs"]
codex:
extra_flags: ["--quiet"]
gemini:
extra_flags: ["--sandbox"]
Choosing a Backend¶
Use Claude Code when¶
- Working on complex, multi-step tasks
- Needing thorough code review and analysis
- Safety and accuracy are paramount
Use Codex CLI when¶
- Generating boilerplate code
- Writing tests
- Quick code transformations
Use Gemini CLI when¶
- Needing broad knowledge context
- Working with documentation
- General explanations
Tips¶
Try Multiple Backends
Use clinvk compare --all-backends to see how different backends approach the same problem.
Match Backend to Task
Different backends excel at different tasks. Experiment to find the best fit for your workflow.
Configure Defaults
Set backend-specific models and options in your config file for a personalized experience.