npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

anov-dev-copilot-cli

v0.13.1

Published

CLI for ANOV-DEV Copilot

Downloads

1,158

Readme

anov-dev-copilot-cli

anov-dev-copilot-cliANOV-DEV Copilot 体系中的命令行脚手架工具。它的主要职责是帮助开发者一键式地将 AI 智能体的核心能力(Skills、Prompts、Rules 等)注入到当前工作区中,并自动配置编辑器中的 MCP (Model Context Protocol) 服务,从而实现与智能体的无缝连接。


🚀 核心功能

  • 多别名/命令支持:支持以 anov-dev-copilot-clianov-dev-copilotanov-dev-cli 三种命令名执行,满足不同使用习惯。
  • 一键交互式配置:提供 setup 命令,实现 Skills 安装与编辑器 MCP 注入的一站式体验。
  • 主流 AI 编辑器自动对接:自动检测并写入 CursorClaude CodeAntigravity(Gemini Agent)的 MCP 配置文件。
  • 独立子命令:可单独运行 setup-skills 注入 Skills,或 setup-mcp 配置编辑器 MCP。
  • 连通性与环境自测:通过 doctor 快速验证 API 地址和 Ticket 是否有效,支持指定目标 Agent 进行精准测试(兼容 check/test/list-version 别名)。

📦 安装与运行

1. 免安装直接运行(推荐)

npx anov-dev-copilot-cli setup

2. 全局安装

npm install -g anov-dev-copilot-cli
# 或者使用 pnpm
pnpm add -g anov-dev-copilot-cli

🛠️ 命令详解

1. 一键交互式初始化:setup

setup 是最常用、最核心的命令,支持 编辑器 MCP 注入 以及可选的 本地 Agent Skills 拷贝D2C 独立套件安装

anov-dev-copilot setup [options]

支持的参数选项:

| 选项 | 说明 | 默认值 | | :--- | :--- | :--- | | --api-url <url> | ANOV 接口服务的 API Base URL | - | | --ticket <ticket> | 调用 ANOV 接口的 Access Ticket | - | | --mg-mcp-token <token> | MasterGo 访问令牌(MG_MCP_TOKEN,可选,用于 MasterGo 设计稿还原) | - | | --mg-token, --mastergo-token, --mastergo-api-key | --mg-mcp-token 的等效别名 | - | | --yes | 自动配置所有检测到的 AI 编辑器,跳过交互式编辑器选择 | false | | --editors <list> | 逗号分隔的编辑器列表(如 cursor,claude,antigravity) | - | | --with-skills | 同时将 Agent Skills 拷贝到目标项目目录(默认关闭) | false | | --d2c | 切换为安装零 MCP 依赖的 MasterGo D2C 独立套件(委托 npx skills add) | false | | -g, --global | 与 --d2c 配合使用,全局安装 Skills(如 ~/.agents/skills) | false | | --dest <path> | 与 --with-skills--d2c 配合使用,指定 Skills 安装目标目录 | . (当前目录) | | --force | 与 --with-skills 配合使用,强制覆盖已有 Skills 文件夹 | false |

[!NOTE] 三大主流 AI 编辑器(Antigravity、Claude Code、Cursor)均支持插件系统,插件安装后 Skills 全局生效。因此 setup 默认只配置 MCP,无需将 Skills 拷贝到项目目录。仅在需要项目级定制化覆盖时使用 --with-skills,或需要纯离线设计稿还原时使用 --d2c

交互式配置工作流:

  1. (可选)安装 Skills:使用 --with-skills 拷贝全量技能至 .agents/skills/;或使用 --d2c 交互式分发 D2C 独立套件。
  2. 输入 API 与凭证配置:如未通过命令行参数指定,CLI 会交互式地要求输入 API Base URLAccess Ticket 以及可选的 MasterGo Token (MG_MCP_TOKEN)
  3. 选择目标编辑器:自动检测系统上已安装的编辑器配置,并列出选项供您勾选。

2. 独立 D2C 套件安装:setup-d2c

一键安装零 MCP 依赖的 ANOV-DEV MasterGo D2C 大屏设计稿还原技能套件(6 大核心技能)。本命令直接调用行业标准 npx skills add,自动识别当前项目或全局环境下的 AI 编辑器(Cursor、Claude Code、Antigravity 等),无需手动复制文件:

anov-dev-copilot setup-d2c [options]

支持选项:

| 选项 | 说明 | 默认值 | | :--- | :--- | :--- | | -y, --yes | 自动选择所有检测到的 AI 编辑器并跳过确认 | false | | -g, --global | 安装到用户全局目录(如 ~/.agents/skills) | false | | --all | 自动勾选套件中的全部 6 个技能 | false | | -a, --agent <agents...> | 指定目标 AI 编辑器(如 cursor, claude-code, antigravity) | - | | --dest <path> | 目标项目根目录 | . (当前目录) |


3. Agent Skills 安装:setup-skills

为当前项目或全局环境安装或更新官方全量 Agent Skills,通过行业标准 npx skills add 进行分发,自动适配主流 AI 编辑器:

anov-dev-copilot setup-skills [options]

支持选项:

| 选项 | 说明 | 默认值 | | :--- | :--- | :--- | | --dest <path> | Skills 文件输出/工作区目标目录 | . (当前目录) | | -y, --yes | 自动选择所有检测到的 AI 编辑器并跳过交互确认 | false | | --force | 强制覆盖已有 Skills 文件夹,跳过非 ANOV 项目确认 | false | | -g, --global | 安装 Skills 到全局用户目录(如 ~/.agents/skills) | false | | --all | 自动勾选套件中的全部技能 | false | | -a, --agent <agents...> | 指定目标 AI 编辑器(如 cursor, claude-code, antigravity) | - | | -s, --skill <skills...> | 指定需要安装的单个或多个技能名称 | - | | --copy | 以完整文件拷贝模式写入(非软链接) | true |


4. 仅注入 MCP 配置:setup-mcp

单独更新编辑器的 MCP 服务配置(例如 Ticket 过期或需要配置/更新 MasterGo Token):

anov-dev-copilot setup-mcp [options]

支持选项:

| 选项 | 说明 | 默认值 | | :--- | :--- | :--- | | --api-url <url> | 指定接口 Base URL | - | | --ticket <ticket> | 指定 Access Ticket | - | | --mg-mcp-token <token> | MasterGo 访问令牌(MG_MCP_TOKEN,可选) | - | | --mg-token, --mastergo-token, --mastergo-api-key | --mg-mcp-token 的等效别名 | - | | -y, --yes | 直接为所有检测到的编辑器自动注入配置 | false | | --editors <list> | 以逗号分隔的指定编辑器(如 cursor,claude,antigravity) | - | | -a, --agent <agents...> | 指定目标 AI 编辑器(与 --editors 等价) | - | | -e, --editor <editors...> | 别名参数(与 --agent 等价) | - |


5. 一键卸载与清理:uninstall (别名: remove)

安全注销已注入的编辑器 MCP 服务配置,或清理官方 Agent Skills 技能:

anov-dev-copilot uninstall [options]
# 或使用等价别名
anov-dev-copilot remove [options]

支持选项:

| 选项 | 说明 | 默认值 | | :--- | :--- | :--- | | -y, --yes | 跳过确认提示,自动执行卸载 | false | | --mcp | 仅注销编辑器的 MCP 服务配置(不清理 Skills) | - | | --skills | 仅清理已安装的 Agent Skills(不修改 MCP 服务) | - | | -a, --agent <agents...> | 指定需要注销的目标 AI 编辑器 | 自动扫描所有已安装编辑器 | | -e, --editor <editors...> | 别名参数(与 --agent 等价) | - | | --editors <list> | 逗号分隔的目标编辑器列表 | - | | -g, --global | 清理全局用户目录下的 Skills(如 ~/.agents/skills) | false | | --dest <path> | 指定需要清理 Skills 的目标项目目录 | . (当前目录) | | -s, --skill <skills...> | 指定需要清理的特定技能名称 | 默认清理 ANOV 官方技能清单 |


6. 环境诊断与连通性测试:doctor (别名: check, test, list-version)

测试当前 API 连接是否正常、诊断各 AI 编辑器的配置有效性,并清晰地报告使用的是哪个 Agent 的配置。该命令向 /console/v1/devs/demos/v1 接口发起请求并打印结果。

anov-dev-copilot doctor [editor] [options]
# 或使用等价别名
anov-dev-copilot check [editor] [options]
anov-dev-copilot test [editor] [options]
anov-dev-copilot list-version [editor] [options]

支持的参数选项:

| 参数/选项 | 说明 | | :--- | :--- | | [editor] | 可选位置参数,指定要测试哪个 Agent 的全局配置 | | -e, --editor <editor> | 显式指定目标 Agent | | -a, --agent <editor> | 别名参数(与 --editor 等价) |

[editor] 的可用值(大小写不敏感):

| 值 | 目标 Agent | | :--- | :--- | | cursor | Cursor | | claudeclaude-code | Claude Code | | antigravitygeminiagy | Antigravity |

配置读取优先级:

  1. 当提供 [editor] 参数时 → 仅读取指定 Agent 的全局配置文件。
  2. [editor] 且工作区存在 .mcp.jsonmcp_config.json → 优先读取本地工作区配置。
  3. [editor] 且无本地配置 → 依次扫描 Cursor → Claude Code → Antigravity 的全局配置,返回第一个有效值。
  4. 以上均未命中 → 读取 Shell 环境变量 API_BASE_URLACCESS_TICKETMG_MCP_TOKEN

命令示例:

# 自动检测(优先读取本地工作区配置或第一个全局配置)
anov-dev-copilot doctor
anov-dev-copilot check

# 显式测试 Antigravity 的全局配置
anov-dev-copilot doctor antigravity
anov-dev-copilot check -e gemini      # 等价(别名)

# 显式测试 Claude Code 的全局配置
anov-dev-copilot test claude
anov-dev-copilot doctor --editor claude-code   # 等价

# 测试 Cursor 的全局配置
anov-dev-copilot doctor cursor

输出示例:

[Test] Config Source     : Global Config File
[Test] Target Agent      : Antigravity
[Test] API Base URL      : http://192.168.11.164:9999
[Test] Access Ticket     : ccdc...0ea6
[Test] MasterGo Token    : 7a8b...9f01 (MG_MCP_TOKEN)
[Test] Sending request to /console/v1/devs/demos/v1 ...

[Test] Success! Response data:
{ ... }

[!NOTE] 若指定的 [editor] 在本机未找到对应配置,命令将打印错误信息并以退出码 1 退出,方便在脚本中判断连通性。


💻 编辑器 MCP 自动检测与支持

在运行 setupsetup-mcp 时,CLI 会自动扫描以下编辑器:

| 编辑器 | 检测方式 | 配置写入路径 | | :--- | :--- | :--- | | Cursor | 检测 ~/.cursor/ 目录是否存在(或 PATH 中的 cursor 命令) | ~/.cursor/mcp.json | | Claude Code | 检测 ~/.claude.json 文件是否存在(或 PATH 中的 claude 命令) | ~/.claude.json | | Antigravity | 检测 ~/.gemini/ 目录是否存在(或 PATH 中的 agy 命令) | ~/.gemini/config/mcp_config.json |

[!NOTE] CLI 优先通过配置文件/目录路径判断编辑器是否安装,若路径不存在则回退到检测 PATH 中的可执行文件(cursor / claude / agy)。配置文件/目录不存在时,CLI 会自动创建。

[!NOTE] Antigravity 写入策略:CLI 直接向全局配置文件 ~/.gemini/config/mcp_config.json 写入 mcpServers 配置,以确保凭证正确注入。


📝 手动配置指引

若 CLI 未能自动识别你的编辑器,可在相应配置文件的 mcpServers 字段下手动添加:

{
  "mcpServers": {
    "anov-dev-copilot": {
      "command": "npx",
      "args": ["-y", "anov-dev-copilot-mcp"],
      "env": {
        "API_BASE_URL": "你的_ANOV_API_BASE_URL",
        "ACCESS_TICKET": "你的_ANOV_ACCESS_TICKET",
        "MG_MCP_TOKEN": "你的_MASTERGO_TOKEN(可选)"
      }
    }
  }
}

[!IMPORTANT]

  1. 请将 API_BASE_URLACCESS_TICKET 替换为你在 ANOV 平台上获取的真实有效值。
  2. 配置完成后,请务必重启 AI 编辑器或在 MCP 面板中手动重载 (Reload) 该 MCP Server,以使配置生效。

🛠️ 开发与构建

本地代码编译

CLI 项目采用 tsup 进行 TypeScript 编译。构建脚本会在 tsup 打包完成后,自动调用 scripts/copy-skills.js 执行以下流程:

  1. 复制并预编译全量技能到 dist/skills/(MCP 模式)。
  2. 独立打包 6 大核心 D2C 技能到 dist/d2c-skills/(独立模式)。
  3. 针对不同模式分别进行 Markdown 条件预编译(@if mcp / @if d2c),并为辅助执行脚本赋予可执行权限。
# 在 packages/cli 目录下执行
pnpm build

热更新开发模式

# 在 packages/cli 目录下执行
pnpm dev

此命令会监视 src/ 下文件的变动并自动重新编译。