Files

121 lines
3.9 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================================
# AgentDock 适配器 · GitHub Copilot CLIWave 3
# 数据依据:调研底稿 agent-cli-survey-2026-08-24.md + 架构 §3.3
# 备注:登录方式以本机终端 /login 为主;无头用 PAT 环境变量授权;需 Copilot 订阅。
# ============================================================
id: copilot
name: Copilot CLI
name_zh: Copilot CLI
vendor: GitHub
status: available
adapter_version: 1.1.0
license: 专有(仅官方渠道安装、不重打包)
platforms:
windows:
architectures: [x64]
notes: winget 渠道需 PowerShell 6+winget 安装 GitHub.Copilot
linux:
distributions: [ubuntu]
architectures: [x64]
official:
homepage: https://github.com/features/copilot
docs: https://docs.github.com/copilot
allowed_hosts: [github.com, docs.github.com, registry.npmjs.org]
runtime_deps: []
install:
preferred: winget
channels:
- id: winget
platforms: [windows]
command: [winget, install, GitHub.Copilot]
package: GitHub.Copilot
elevate: never
post_checks: [detect]
- id: npm
platforms: [windows, linux]
command: [npm, install, -g, "@github/copilot"]
package: "@github/copilot"
elevate: never
post_checks: [detect]
detect:
executable: copilot
version_args: ["--version"]
version_regex: "(\\d+\\.\\d+\\.\\d+)"
update:
method: winget_upgrade
command: [winget, upgrade, GitHub.Copilot]
source:
kind: npm
package: "@github/copilot"
uninstall:
method: package_manager
command: [winget, uninstall, GitHub.Copilot]
keep_config_default: true
authorization:
modes:
- mode: local_tui
command: [copilot]
notes_zh: 运行 copilot 后输入 /login 在终端内登录 GitHub 账号
- mode: api_key
env_keys: [GH_TOKEN]
notes_zh: 无头授权:设置 GitHub PAT(GH_TOKEN)环境变量后无需交互登录
# 配置机制(调研底稿 Copilot 章节):JSON + 环境变量(COPILOT_*)。
# 无头授权用 PAT 环境变量;交互登录经 /login 写回本机会话。
configuration:
files: []
environment:
- key: GH_TOKEN
sensitive: true
maps_to_field: api_key
- key: COPILOT_API_KEY
sensitive: true
maps_to_field: api_key
fields:
- id: api_key
label_zh: 访问令牌(PAT
group: auth
help_zh: 存入系统密钥库(对应 GH_TOKEN / COPILOT_API_KEY),用于无头授权;需 Copilot 订阅
required: false
sensitive: true
type: string
storage: keyring
docs_url: https://docs.github.com/copilot
diagnostics:
- rule_id: path.not_installed
- rule_id: path.not_in_path
- rule_id: version_conflict.multiple_copies
documentation:
quickstart_zh: 安装后运行 `copilot`,在终端输入 `/login` 登录 GitHub 账号;或用 `copilot -p "提示词"` 无头执行。
install_zh: Windows 推荐 winget `GitHub.Copilot`(需 PowerShell 6+);双端可用 npm `@github/copilot`。Ubuntu 另有官方脚本 / brew 渠道。
auth_zh: ① 本机终端登录:运行 `copilot` 输入 /login(交互);② 无头 PAT:设置 GH_TOKEN(或 COPILOT_API_KEY)环境变量。需要有效 Copilot 订阅(个人/商业/企业)。
commands:
- cmd: copilot
desc_zh: 启动交互式会话
- cmd: copilot -p "提示词"
desc_zh: 无头单次执行
- cmd: copilot --help
desc_zh: 查看帮助
params:
- param: -p / --print
desc_zh: 无头模式执行后退出
- param: --output-format
desc_zh: 输出格式
- param: --model
desc_zh: 指定模型
updated_at: "2026-08-25"
risks_zh:
- 需要有效 Copilot 订阅(免费 GitHub 账号不提供 Copilot CLI 完整能力)
- 真机 `copilot --version` 返回「GitHub Copilot CLI 1.0.80.」,版本检测已据此确认
- winget 渠道需 PowerShell 6+(见 platforms.notes