clinvk compare¶
Compare responses from multiple backends.
Synopsis¶
Description¶
Send the same prompt to multiple backends and compare their responses. CLI compare runs are always ephemeral (no sessions are persisted).
Flags¶
| Flag | Type | Default | Description |
|---|---|---|---|
--backends |
string | Comma-separated backend list | |
--all-backends |
bool | false |
Compare all registered backends (skips unavailable CLIs) |
--sequential |
bool | false |
Run one at a time |
--json |
bool | false |
JSON output |
Examples¶
Compare Specific Backends¶
Compare All Backends¶
Sequential Execution¶
JSON Output¶
Output¶
Text Output¶
Comparing 3 backends: claude, codex, gemini
Prompt: explain this algorithm
================================================================================
[claude] This algorithm implements a binary search...
[codex] The algorithm performs a binary search...
[gemini] This is a classic binary search implementation...
================================================================================
COMPARISON SUMMARY
================================================================================
BACKEND STATUS DURATION OUT_LEN SCORE MODEL
--------------------------------------------------------------------------------
claude OK 2.50s 812 85.70 claude-opus-4-5-20251101
gemini OK 2.80s 740 81.33 gemini-2.5-pro
codex OK 3.20s 690 74.59 o3
--------------------------------------------------------------------------------
Ranking rule: score desc, duration asc, backend asc
Total time: 3.20s
JSON Output¶
{
"prompt": "explain this algorithm",
"backends": ["claude", "codex", "gemini"],
"results": [
{
"backend": "claude",
"model": "claude-opus-4-5-20251101",
"output": "This algorithm implements a binary search...",
"output_length": 812,
"duration_seconds": 2.5,
"exit_code": 0
}
],
"summary": {
"score_formula_version": "v1",
"dimensions": ["status", "latency_seconds", "output_length"],
"ranking": [
{
"backend": "claude",
"status": "OK",
"latency_seconds": 2.5,
"output_length": 812,
"score": 85.7,
"rank": 1
}
]
},
"total_duration_seconds": 3.2
}
Execution Modes¶
Parallel (Default)¶
All backends run simultaneously:
Sequential¶
Run backends one at a time:
Error Handling¶
Unavailable backends are skipped with a warning. If any selected backend fails during execution, the command exits with a non-zero status.
Exit Codes¶
| Code | Description |
|---|---|
| 0 | All selected backends succeeded |
| 1 | Any backend failed or none were available |