跳转到主要内容

概述

apollo ai 命令将你连接到 Apollo Brain — 与 Web 应用中相同的 AI 助手,拥有全部 160+ 工具 — 直接在终端中使用。

单次模式

提出问题并获取实时流式响应:
apollo ai "What tasks are blocked right now?"
响应会实时流式传输,在终端中以格式化的 markdown 呈现。

管道和脚本

# Pipe to clipboard
apollo ai "Summarize this week's progress" | pbcopy

# Use in scripts
apollo ai "How many tasks are blocked?" --json
--json 模式下,AI 响应会流式输出到 stderr,而最终的结构化结果会输出到 stdout。这样可以安全地使用管道,同时不会丢失流式体验。

交互式聊天模式

如需多轮对话,请使用 --chat 标志:
apollo ai --chat
这会打开一个具有持久对话上下文的 REPL:
Apollo Brain — Interactive Chat
Type /quit to exit, /clear to reset context
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

You: What's the status of the Delfin One project?

Brain: Delfin One has 142 tasks total:
  - 72 completed (51%)
  - 12 in progress
  - 31 to do
  - 4 blocked

You: Assign #158 to Carlos and set it to high priority

Brain: I'd like to update task #158:
  - Assignee: Carlos Silva
  - Priority: High

  Approve?  [Y/n]

聊天命令

命令说明
/quit退出聊天会话
/clear重置对话上下文
/history显示当前对话记录

人工确认

写入操作(创建、更新、删除)始终需要确认:
  • 交互模式:显示审批提示([Y/n]
  • --json 模式:返回 requires_confirmation 响应 — 传入 --confirm 可自动批准
# Auto-approve for scripts (use with caution)
apollo ai "Mark task #142 as done" --json --confirm

示例

# Daily standup summary
apollo ai "Give me a standup summary: what I did yesterday, what I'm doing today, and any blockers"

# Sprint planning
apollo ai "Which unassigned tasks in the current sprint have the highest priority?"

# Release readiness
apollo ai "Is release v2.1.0 on track? What's the biggest risk?"

# Code context
git diff HEAD~3 | apollo ai "Summarize these changes and suggest which Apollo tasks they relate to"