cli-eval
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->
<!-- 由 src/lib/agentSkills/generator.ts 生成;手动编辑将被覆盖 -->
Overview
概述
Create and run evaluation suites, watch live benchmark progress, view scorecards, compare model performance, and integrate eval runs with CI workflows from the CLI.
通过 CLI 创建和运行评估套件、实时查看基准测试进度、查看记分卡、比较模型性能,并将评估运行集成到 CI 工作流中。
Quick install
快速安装
bash
npm install -g omniroute # or: npx omniroute
omniroute --versionbash
npm install -g omniroute # or: npx omniroute
omniroute --versionSubcommands
子命令
eval
evaleval
evalExample:
bash
omniroute eval示例:
bash
omniroute evaleval suites
eval suiteseval suites
eval suitesExample:
bash
omniroute eval suites示例:
bash
omniroute eval suiteseval list
eval listeval list
eval listExample:
bash
omniroute eval list示例:
bash
omniroute eval listeval get <suiteId>
eval get <suiteId>eval get <suiteId>
eval get <suiteId>Example:
bash
omniroute eval get <suiteId>示例:
bash
omniroute eval get <suiteId>eval create
eval createeval create
eval createFlags:
--file <path>
Example:
bash
omniroute eval create参数:
--file <path>
示例:
bash
omniroute eval createeval run <suiteId>
eval run <suiteId>eval run <suiteId>
eval run <suiteId>Flags:
-m, --model <id>--combo <name>--concurrency <n>--tag <tag>--watch
Example:
bash
omniroute eval run <suiteId>参数:
-m, --model <id>--combo <name>--concurrency <n>--tag <tag>--watch
示例:
bash
omniroute eval run <suiteId>eval list
eval listeval list
eval listFlags:
--suite <id>--status <s>--since <ts>--limit <n>
Example:
bash
omniroute eval list参数:
--suite <id>--status <s>--since <ts>--limit <n>
示例:
bash
omniroute eval listeval get <runId>
eval get <runId>eval get <runId>
eval get <runId>Example:
bash
omniroute eval get <runId>示例:
bash
omniroute eval get <runId>eval results <runId>
eval results <runId>eval results <runId>
eval results <runId>Flags:
--failed
Example:
bash
omniroute eval results <runId>参数:
--failed
示例:
bash
omniroute eval results <runId>eval cancel <runId>
eval cancel <runId>eval cancel <runId>
eval cancel <runId>Flags:
--yes
Example:
bash
omniroute eval cancel <runId>参数:
--yes
示例:
bash
omniroute eval cancel <runId>eval scorecard <runId>
eval scorecard <runId>eval scorecard <runId>
eval scorecard <runId>Example:
bash
omniroute eval scorecard <runId>示例:
bash
omniroute eval scorecard <runId>simulate [prompt]
simulate [prompt]simulate [prompt]
simulate [prompt]Flags:
--file <path>-m, --model <id>--combo <name>--reasoning-effort <level>--thinking-budget <n>--explain
Example:
bash
omniroute simulate [prompt]参数:
--file <path>-m, --model <id>--combo <name>--reasoning-effort <level>--thinking-budget <n>--explain
示例:
bash
omniroute simulate [prompt]OmniRoute — CLI Evals
OmniRoute — CLI 评估
Requires the CLI. See CLI entry-point skill for install + global flags.
omniroute需要使用 CLI。有关安装和全局参数,请参阅 CLI 入口点 skill。
omnirouteWhat are evals?
什么是评估?
Evals are automated test suites that score LLM outputs against expected answers or rubrics. OmniRoute stores suites and run results in its local database.
评估(eval)是自动化测试套件,用于根据预期答案或评分标准对 LLM 输出进行评分。OmniRoute 将套件和运行结果存储在其本地数据库中。
Eval suites
评估套件
bash
omniroute eval suites list # List all eval suites
omniroute eval suites list --json # JSON output
omniroute eval suites get <suiteId> # Full suite definitionbash
omniroute eval suites list # List all eval suites
omniroute eval suites list --json # JSON output
omniroute eval suites get <suiteId> # Full suite definitionCreate a suite
创建套件
bash
omniroute eval suites create \
--name "code-quality" \
--rubric "exact-match" \
--samples-file ./samples.jsonl # JSONL: {input, expected_output}Rubric options: , , , .
exact-matchcontainsllm-judgeregex--samples-filejsonl
{"input": "What is 2+2?", "expected_output": "4"}
{"input": "Translate 'hello' to Spanish", "expected_output": "hola"}bash
omniroute eval suites create \
--name "code-quality" \
--rubric "exact-match" \
--samples-file ./samples.jsonl # JSONL: {input, expected_output}评分标准(rubric)选项:、、、。
exact-matchcontainsllm-judgeregex--samples-filejsonl
{"input": "What is 2+2?", "expected_output": "4"}
{"input": "Translate 'hello' to Spanish", "expected_output": "hola"}Run an eval
运行评估
bash
omniroute eval suites run <suiteId> \
--model claude-sonnet-4-6 # Run suite against a specific model
omniroute eval suites run <suiteId> \
--model gpt-4o \
--watch # Live TUI progress (EvalWatch)The run is asynchronous. Use for a live terminal dashboard or poll manually:
--watchbash
RUN_ID=$(omniroute eval suites run <suiteId> --model claude-sonnet-4-6 --output json | jq -r '.id')
omniroute eval get $RUN_IDbash
omniroute eval suites run <suiteId> \
--model claude-sonnet-4-6 # Run suite against a specific model
omniroute eval suites run <suiteId> \
--model gpt-4o \
--watch # Live TUI progress (EvalWatch)运行过程是异步的。使用 可查看实时终端仪表板,也可以手动轮询:
--watchbash
RUN_ID=$(omniroute eval suites run <suiteId> --model claude-sonnet-4-6 --output json | jq -r '.id')
omniroute eval get $RUN_IDManage runs
管理运行
bash
omniroute eval list # List all eval runs
omniroute eval list --json
omniroute eval get <runId> # Run details (status, model, score)
omniroute eval results <runId> # Per-sample results
omniroute eval scorecard <runId> # Full scorecard with pass/fail per sample
omniroute eval cancel <runId> # Cancel a running evalbash
omniroute eval list # List all eval runs
omniroute eval list --json
omniroute eval get <runId> # Run details (status, model, score)
omniroute eval results <runId> # Per-sample results
omniroute eval scorecard <runId> # Full scorecard with pass/fail per sample
omniroute eval cancel <runId> # Cancel a running evalScorecard output
记分卡输出
bash
omniroute eval scorecard <runId> --output jsonResponse fields per sample:
json
{
"id": "sample-1",
"score": 0.95,
"passed": true,
"input": "What is 2+2?",
"output": "4",
"expected": "4"
}bash
omniroute eval scorecard <runId> --output json每个样本的响应字段:
json
{
"id": "sample-1",
"score": 0.95,
"passed": true,
"input": "What is 2+2?",
"output": "4",
"expected": "4"
}Comparing models
模型对比
Run the same suite against multiple models and compare:
bash
for MODEL in claude-sonnet-4-6 gpt-4o gemini-2.0-flash; do
omniroute eval suites run $SUITE_ID --model $MODEL --output json | jq '{model: .model, score: .score}'
done对多个模型运行同一套件并进行比较:
bash
for MODEL in claude-sonnet-4-6 gpt-4o gemini-2.0-flash; do
omniroute eval suites run $SUITE_ID --model $MODEL --output json | jq '{model: .model, score: .score}'
doneCI integration
CI 集成
bash
undefinedbash
undefinedRun and fail CI if score drops below threshold
Run and fail CI if score drops below threshold
SCORE=$(omniroute eval suites run $SUITE_ID --model claude-sonnet-4-6 --output json | jq -r '.score')
python3 -c "import sys; score=float('$SCORE'); sys.exit(0 if score >= 0.90 else 1)"
undefinedSCORE=$(omniroute eval suites run $SUITE_ID --model claude-sonnet-4-6 --output json | jq -r '.score')
python3 -c "import sys; score=float('$SCORE'); sys.exit(0 if score >= 0.90 else 1)"
undefinedErrors
错误
- fails with
suites create→ use one of:invalid rubric,exact-match,contains,llm-judgeregex - returns
suites run→ verify model ID withmodel not foundomniroute models --search <name> - shows
eval get→ checkstatus: failedfor error detailsomniroute logs --search eval - returns empty results → the run may still be
scorecard; pollrunninguntilomniroute eval get <runId>isstatuscompleted
- 失败并提示
suites create→ 使用以下选项之一:invalid rubric、exact-match、contains、llm-judgeregex - 返回
suites run→ 使用model not found验证模型 IDomniroute models --search <name> - 显示
eval get→ 使用status: failed查看错误详情omniroute logs --search eval - 返回空结果 → 运行可能仍处于
scorecard状态;轮询running,直至omniroute eval get <runId>变为statuscompleted