consult
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseconsult - AI Consultation CLI
consult - AI咨询CLI
Synopsis
概述
bash
consult -m <model> [options]
consult stats [options]The / flag is always required (except for stats).
-m--modelbash
consult -m <model> [options]
consult stats [options]-m--modelModels
模型
| Model | Alias | Speed | Approach |
|---|---|---|---|
| | ~120-150s | File access via --yolo, fast |
| | ~200-250s | Shell command exploration, thorough |
| | ~60-120s | Agent SDK with tool use |
| 模型 | 别名 | 速度 | 实现方式 |
|---|---|---|---|
| | ~120-150s | 通过--yolo访问文件,速度快 |
| | ~200-250s | Shell命令探索,全面深入 |
| | ~60-120s | 支持工具调用的Agent SDK |
Modes
模式
General Mode
通用模式
bash
consult -m gemini --prompt "What's the best way to structure auth?"
consult -m codex --prompt-file review-checklist.mdbash
consult -m gemini --prompt "What's the best way to structure auth?"
consult -m codex --prompt-file review-checklist.mdProtocol Mode
协议模式
bash
consult -m gemini --protocol spir --type spec # Review a specification
consult -m codex --protocol spir --type plan # Review a plan
consult -m claude --protocol spir --type impl # Review implementation
consult -m gemini --protocol spir --type pr # Review a PR
consult -m codex --protocol spir --type phase # Phase-scoped review
consult -m gemini --type integration # Integration reviewbash
consult -m gemini --protocol spir --type spec # Review a specification
consult -m codex --protocol spir --type plan # Review a plan
consult -m claude --protocol spir --type impl # Review implementation
consult -m gemini --protocol spir --type pr # Review a PR
consult -m codex --protocol spir --type phase # Phase-scoped review
consult -m gemini --type integration # Integration reviewStats Mode
选项
bash
consult stats # 30-day summary
consult stats --days 7 --json # Last 7 days as JSONbash
-m, --model <model> # Model to use (required except stats)
--prompt <text> # Inline prompt (general mode)
--prompt-file <path> # Prompt from file (general mode)
--protocol <name> # Protocol: spir, bugfix, tick, maintain
-t, --type <type> # Review type: spec, plan, impl, pr, phase, integration
--issue <number> # Issue number (architect context)Options
评审类型(搭配--protocol使用的--type)
bash
-m, --model <model> # Model to use (required except stats)
--prompt <text> # Inline prompt (general mode)
--prompt-file <path> # Prompt from file (general mode)
--protocol <name> # Protocol: spir, bugfix, tick, maintain
-t, --type <type> # Review type: spec, plan, impl, pr, phase, integration
--issue <number> # Issue number (architect context)| 类型 | 使用场景 |
|---|---|
| 评审规范完整性 |
| 评审实现方案 |
| 评审代码实现 |
| 合并前评审拉取请求 |
| 阶段范围评审(仅构建者可用) |
| 架构师的集成评审 |
协议特定的提示词存储在路径下。
codev/protocols/<protocol>/consult-types/Review Types (--type with --protocol)
上下文解析
| Type | Use Case |
|---|---|
| Review specification completeness |
| Review implementation plan |
| Review code implementation |
| Review pull request before merge |
| Phase-scoped review (builder only) |
| Architect's integration review |
Protocol-specific prompts live in .
codev/protocols/<protocol>/consult-types/- 构建者上下文(当前工作目录在中):自动从porch状态检测项目
.builders/ - 架构师上下文(当前工作目录在外):需要
.builders/参数--issue <N>
Context Resolution
并行咨询(三方/ cmap模式)
- Builder context (cwd in ): auto-detects project from porch state
.builders/ - Architect context (cwd outside ): requires
.builders/--issue <N>
为进行全面评审,可并行运行三个模型:
bash
consult -m gemini --protocol spir --type spec &
consult -m codex --protocol spir --type spec &
consult -m claude --protocol spir --type spec &
wait或者在Claude Code中使用cmap模式:三个并行的后台Bash调用。
Parallel Consultation (3-Way / cmap)
常见错误
Run all three models in parallel for thorough reviews:
bash
consult -m gemini --protocol spir --type spec &
consult -m codex --protocol spir --type spec &
consult -m claude --protocol spir --type spec &
waitOr from Claude Code, use cmap pattern: three parallel background Bash calls.
- 标记为必填项——
-m如果没有该标记会执行失败consult --type spec - 不能同时使用和
--prompt(模式冲突)--type - 不能同时使用和
--prompt--prompt-file - 需要搭配
--protocol使用——不能单独使用--type - 通用模式:的文本需直接传入,不能作为位置参数
--prompt
Common Mistakes
—
- The flag is required —
-mwill fail without itconsult --type spec - Cannot combine with
--prompt(mode conflict)--type - Cannot use and
--prompttogether--prompt-file - requires
--protocol— cannot use alone--type - General mode: text is passed directly, not as a positional arg
--prompt
—