@great-arrow/cli

中文文档
0.11.18发布于 2026/11/13SEE LICENSE IN LICENSEES Module近 30 天下载 7255

大箭头.ai CLI 工具

中文使用文档
文档目录23 节
  1. 安装
  2. 诊断遥测
  3. 认证
  4. 图标
  5. 本地硬件诊断
  6. 内存
  7. 回答代理人的请求
  8. 工作空间
  9. 待办事项
  10. 通讯代理
  11. 决定
  12. 报复协调(平行代理人)
  13. 诊断
  14. MCP 服务器
  15. 探员
  16. 清除棋盘
  17. 业务
  18. 贝壳补全
  19. 输出模式
  20. 配置
  21. 退出代码
  22. 发展
  23. 许可证

@ great-arrow/cli (英语)gad(中文(简体) )

基于终端接入"大箭"数字平台——内存管理,工作空间管理,集成诊断,和MCP工具.

安装

npm install -g @great-arrow/cli

要求数 节点.js 24+。 。 。 .

诊断遥测

CLI诊断是选入. 启用方式 GAD_TELEMETRY=1 用于会话或设定 telemetry_enabled = true 内 ~/.gadrc; 禁用为 GAD_TELEMETRY=0。 。 。 . 只发送了有界限的命令,网络,和MCP故障元数据. 全权证书, cookie、路径和类似电子邮件的字段被编辑; 遥测失败永远不会发生 影响命令行为.

认证

# Browser login (loopback OAuth + PKCE). Opens your browser, captures the
# callback locally, and stores a refreshable credential — no copy-paste.
# The session refreshes itself; you won't be asked to log in again until the
# refresh token expires.
gad login

# If a browser can't be opened (SSH/remote), print the URL to open manually
gad login --no-browser

# Direct personal token (CI/CD, headless). Stored as-is; no auto-refresh.
# Over a signed-in OAuth session it takes a gad_v1_ token, keeps the session
# when handed the session's own access token, and otherwise needs --force.
gad login --token gad_v1_xxxxx

# Check who you are (shows auth type + access-token expiry)
gad whoami

# Revoke the session server-side and remove stored credentials
gad logout

# For tools, not humans: print a fresh access token through the CLI's locked
# refresh path (~/.great-arrow/refresh.lock), so other programs never refresh
# this credential themselves. --json prints {accessToken, accessExpiresAt,
# apiUrl}. Exit 2: session expired or not signed in. Exit 3: the stored
# credential is a personal token (nothing to refresh).
gad auth token [--json]

代表证按你的方式0600 ~/.great-arrow/credential 存储( 内置) 0700 ~/.great-arrow/)和/或您的OS键链(Keychain 访问/ libsecret /) (原始内容存档于2018-09-21). Creditive Vault. 保存中 ~/.great-arrow/credential 同步读取 首先避免重复的 macOS 键链 cdhash 多个时密码提示 节点.js 版本 (nvm, (中文(简体) ), volta, homebrew)或 stdio MCP 代理访问 自动刷新 OAuth 令牌 . GAD_TOKEN 在环境永远 以CI为准.

图标

本地硬件诊断

gad local doctor 读取这台计算机的RAM 和家用音量上可用的空间. 使用 --json 用于结构化观测或 --quiet 以压制人类报告。 它不签名,不下载模型,不加载模型,不录入设备或更改设置.

自由RAM是一种操作系统观测,不可用模型能力. 图形存储器和模型相容性保持不合格,直到其单独的检查运行. 家用量空间可能不同于定制的奥拉马模型位置. 文件系统探测器在3秒后停止等待,并报告不可用而不是零.

此命令正在根据 T04 电话;来源和本地构建检查没有建立已公布的安装器或完成的设置.

内存

gad memory create --title "API design decision" --content "We chose REST over GraphQL because..."
gad memory search "authentication flow"
gad memory list --layer SEMANTIC --tag auth
gad memory get <id>
gad memory update <id> --title "Reviewed note" --expected-version 4
gad memory delete <id>

# Pipe content from stdin
cat notes.md | gad memory create --title "Meeting notes"

gad memory update 通过相同方式支持元数据的变化 memory_update mCP和网络应用所使用的工具. 它接受 --title, (中文(简体) ), --layer, (中文(简体) ), --importance (0-1) (中文(简体) ), --status (单位:千美元)ACTIVE 或者说 ARCHIVED, (中文(简体) ), --tags 联合国 逗号分隔替换集; 通过 "" )和 --verified。 。 。 . 过 --expected-version 从 gad memory get 拒绝 stale 编辑。 删除 继续 gad memory delete,要求确认,除非 --confirm 实值 通过了.

回答代理人的请求

gad answer <message-id> --accept --message "Use staging first"
gad answer <message-id> --decline --message "Not this week"

决定一个向您发出请求的代理人 把结果告诉询问的代理人 它从浏览器工作 gad login 仅; a --token 拒绝登录 .

gad memory search 显示 来源 每个点击的列:原始 文档的链接(GitHub, Notion, Drive...) 当有一个, 否则 内存在网络应用中的页面. gad ask 打印编号 来源 清单 它的答案来自,在答案之下--quiet 隐藏它; --json 保持原始状态 hits) (中文(简体) ).

工作空间

gad workspace list
gad workspace switch my-project
gad workspace info
gad workspace members

待办事项

gad todo list
gad todo list --status in_progress
gad todo create "Fix login bug" --priority high --due 2026-06-05
gad todo done <id>
gad todo update <id> --status review
gad todo create "Review the PR" --external-agent skippy   # --me | --specialist <key> | --agent <id> | --external-agent <name|id>
gad todo assign <id> --external-agent skippy              # a connected agent, by name, alias or connection id
gad todo assign <id> --device "Studio Mac" --adapter claude-code   # prints the passkey approval link; nothing starts until you approve
gad todo comment <id> "Take this one" --mention skippy    # hands the card to that agent

任务是被动的:平台内代理被排队,从未开始,直到您 运行 gad todo run <id>名称 agents_now (单位:千美元)gad agents(a) 减少 模糊的名称列出匹配的连接 id .

通讯代理

gad send conductor "Anything blocking the train?"
gad send codex "Can you take #7270?" --request   # queues a request it accepts or declines
gad send human "Done, ready for review" --reply-to <message id>

gad send <agent> <message> 呼唤相同 agent_message_send 工具 MCP 使用剂; <agent> 是一个表面名称, human, (中文(简体) ), conductor 或会议编号.

决定

gad decide                          # what is waiting on you
gad decide <id>                     # the question and its options
gad decide <id> --choose Approve    # pick an option by id or label
gad decide <id> --other "..."       # answer in your own words
gad decide <id> --context "..."     # add a note or question; it stays open
gad decide <id> --undo              # take an answer back

终端信号是同一证书 代理贝壳持有,所以答案来自 这里被记录为来自这个关联,而不是你个人的决定. 命令打印登录的页面, 当它算作您的页面时使用 .

报复协调(平行代理人)

# Start a task the safe way: a FRESH worktree on a new branch off the origin
# default branch, with a real dependency install. Refuses in a dirty tree.
gad worktree new feat/fix-login            # creates ../<repo>-fix-login
gad worktree new feat/fix-login ../my-dir  # explicit target dir
gad worktree new feat/fix-login --no-install

# Install the fail-open agent commit guard into this repo's pre-commit hook
# (.husky/pre-commit when husky is present, else .git/hooks/pre-commit).
# Idempotent — re-running never duplicates the hook block.
gad install-hooks

gad worktree new 将创建代理会话标记为工作树所有者. 警卫安装在 gad install-hooks 行走罪犯的PID祖先 承诺时间:如果工作树的主人是 不同, 静态 代理人 中, 承诺被屏蔽( 您正准备执行另一个代理 飞行中的工作)。 每一个模棱两可的——没有所有者标记,死亡所有者,人类 承诺者——未能公开,因此永远无法阻止合法承诺。 故意行为 覆盖 : ALLOW_FOREIGN_WORKTREE=1。 。 。 .

诊断

# Full health check (token, API, integrations, MCP)
gad doctor

# Claude Code surface: server entry, hook wiring, hook credential — and
# whether every hook you have CONFIGURED can actually run. That last check
# reads all four settings scopes (managed, user, project, local), because a
# hook that cannot execute fails silently on every single session and no
# repo-side test can see your user or local file.
gad doctor claude
gad doctor claude --enforce   # back up and repair what is repairable

# It checks the same four Claude Code hooks /install/pair installs (transcript
# Stop, session glance, war-room, live activity). --enforce installs any that
# are missing by running that hook's own --install, so a repaired machine and
# a freshly paired one end up wired identically.

# Integration management
gad integrations list
gad integrations sync github

MCP 服务器

# Run a local stdio MCP server bridging to the hosted Great Arrow endpoint.
# This is what AI clients configured with `npx -y @great-arrow/cli mcp start`
# execute. Auth: GAD_API_TOKEN env → GAD_TOKEN env → stored `gad login`
# credential. For one-off credentials, see `gad mcp start --help`.
gad mcp start

gad mcp status
gad mcp logs
gad mcp test

# Audit every Great Arrow MCP connection on this machine: duplicate entries per
# client (with the most capable one to keep and the exact command to drop the
# rest), credential stores, and live reachability. `--migrate` copies the newest
# valid legacy per-cwd credential into the per-user store and writes the
# keychain credential to the file the stdio proxy reads first.
gad mcp doctor
gad mcp doctor --migrate
gad mcp doctor --json

# Generate MCP config for your AI client
gad mcp install claude
gad mcp install cursor
gad mcp install kiro
gad mcp install codex
gad mcp install gemini

可选: Claude Code 中的工具建议(默认关闭)

gad mcp suggest-tools on        # shows what is sent, then asks [y/N]
gad mcp suggest-tools on --yes  # non-interactive opt-in
gad mcp suggest-tools off       # removes only this hook's entry
gad mcp suggest-tools status
gad mcp install claude --suggest-tools      # or --no-suggest-tools

克劳德密码 UserPromptSubmit 钩钩发送每个提示的文本(最多 两千个角色,别无他法)到"伟大". i 为您自己的代号添加 最多3个大箭头工具名称可能有所帮助。 提示没有存储或 已登录; 钩子在1.5秒后放弃, 并且从未挡住一个提示 。 它又说 1个条目改为 ~/.claude/settings.json 并读取其标志 从 ~/.great-arrow/hook-config.json 从来没有从argv或设置.json. gad doctor claude 报告是否打开.

gad mcp install codex 写入 Codex 的本地文件 ~/.codex/config.toml 服务器 输入并存储无记名符号 ~/.codex/.env。条目 stdio 桥,它检测当前每个 Codex 的取出源 会话; 它没有将一个寄存器放置在全局配置中 .

工作空间目标优先是明确的指令目标,当前 git repo, 然后在还原物外保存的默认值 :

# One command only; accepts an id, slug, or exact name.
gad --workspace great-arrow-digital todo list

# Save a default and see the previous/current workspace in the confirmation.
gad workspace switch great-arrow-digital

# Inside a linked git checkout, the repo workspace wins over that saved default.
gad workspace list

workspace_list 财务报告和审定财务报表 tools_discover 默认为紧凑。 MCP呼叫器可以 请求 detail:"full" 当需要诊断时; 当稳定的工具名称是 已经知道, tools_discover({ tool_name: exactName }) 返回一个没有 浏览完整目录或执行会话/建议数据存储. 高频 todo_log 财务报告和审定财务报表 work_heartbeat 呼叫跳过浓缩批次 并制作一行有品牌的线条,保留当前工作空间提示,无需 重复机板/状态有效载荷.

保持本地 MCP 安装电流

Great Arrow 从标题和用户代理提示中检查本地 MCP/CLI 版本 由已安装的配置发送 gad CLI,还有Stdio代理. 当一个本地 代理为 stale, 推荐给用户的路径为 账户 – 连接 内 网络应用程序,然后代理 更新, (中文(简体) ), 现在更新,或 检查设置 按钮。 该流量提供针对客户的修复步骤,而不需要 用户来理解 MCP 配置文件.

终端倒计时 :

npm install -g @great-arrow/cli@latest
gad doctor
gad mcp install codex   # replace codex with claude, cursor, kiro, gemini, or muse

使用 gad doctor 修复后确认 API 访问, 符号元数据捕获, 和MCP可达到性.

探员

gad agents            # who is working right now, and where
gad agent list
gad agent invoke research-analyst --task "Summarize Q2 metrics"
gad ask "What did we decide about the caching layer?"

清除棋盘

gad board clear                       # preview a run: audit, quote, nothing changes
gad board clear --yes                 # start it (hosted agent unless you pick your computer)
gad board run                         # work an approved run's cards here, with your own agent
gad board run --agent codex --yes     # pick Codex; --yes skips the y prompt
gad board clear --here                # plan, start and work the run in this terminal

gad board run 列出您为这台计算机选择的牌, 有三张 每个行,并询问 y (或 v 来读一次 你自己的克罗德 代码或代码后每张卡在沙箱的工作树上工作. 终点站 承诺和推动 gad/run-<run8>-<card8>大箭头 打开拉出请求 并着陆。 Ctrl- C 安全停止; 运行同一命令继续 剩余牌。 需求 macOS, Linux 带 bubblewrap,或WSL. (中文(简体) ). 运行在运行的检查中 仓库。 见 docs/reference/BOARD_AUTOPILOT.md 关于细节.

业务

gad smoke               # MCP smoke test suite

贝壳补全

gad completions bash >> ~/.bashrc
gad completions zsh >> ~/.zshrc
gad completions fish > ~/.config/fish/completions/gad.fish

输出模式

所有列表/命令支持 :

旗帜效果
--json可读 JSON 输出
--quiet只有数据, 没有装饰
--no-color禁用 ANSI 颜色

当 stdout 不是一个 TTY (管道) 时, 颜色和交互式提示会自动被禁用 .

配置

可选配置文件 : ~/.gadrc数字 :

api_url = https://www.greatarrow.ai
default_workspace = my-project
output_format = table
token = gad_xxxxx

优先发言: GAD_TOKEN o OS 键链 .gadrc 文档.

退出代码

代码含义
0 个成绩
1个认证错误( 过期令牌, 401/ 403)
2个网络出错( 超时出错, 无法到达, 5xx)
3个校验错误( 丢失参数, 输入错误)

发展

# From the repo root
cd packages/cli

# Run tests
pnpm test

# Build (single-file ESM bundle)
pnpm build

# Type check
pnpm typecheck

许可证

专有性——参见根 自由主义。 。 。 .

版本与发布记录

@great-arrow/cli 共发布 76 个版本,首次发布于 2026/06/12;过去 12 个月发布了 76 个版本。

版本发布日期距今
0.11.18latest2026/11/133 天前
0.11.172026/11/134 天前
0.11.162026/11/116 天前
0.11.152026/11/116 天前
0.11.142026/11/106 天前
0.11.132026/11/097 天前

关于 @great-arrow/cli 的常见问题

@great-arrow/cli 是什么?

大箭头.ai CLI 工具

如何安装 @great-arrow/cli?

在项目目录运行 npm install @great-arrow/cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 gad,可以用 npx gad 直接运行。

@great-arrow/cli 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/great-arrow__cli 是否存在。

@great-arrow/cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@great-arrow/cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@great-arrow/cli 可以商用吗?

@great-arrow/cli 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@great-arrow/cli 的下载量有多少?

根据 npm 官方下载统计,@great-arrow/cli 在 2026/10/17 – 2026/11/15 这 30 天内被下载 7,255 次,日均约 242 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@great-arrow/cli 还在维护吗?

最新版本 0.11.18 发布于 2026/11/13(3 天前);至今共发布 76 个版本,其中过去 12 个月发布了 76 个;首次发布于 2026/06/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。