# @dallay/agentsync 中文文档

规范地址：https://npmcn.com/package/%40dallay/agentsync/

版本：1\.53\.1
npm 元数据更新时间：2026-11-09T14:14:51.058Z
中文译文更新时间：2026-11-11T09:23:14.001Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40dallay/agentsync
原文对照：https://npmcn.com/package/%40dallay/agentsync/?lang=original
项目主页：https://github.com/dallay/agentsync#readme
源码仓库：https://github.com/dallay/agentsync

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：14.9 kB，7 个文件
- 模块格式：CommonJS
- TypeScript 类型：未声明
- Node.js 要求：\>=18
- 运行依赖：0 个
- 首次发布：2026-01-16T08:57:08.660Z
- 最新版本发布：2026-11-09T14:14:50.726Z
- 近 30 天下载量：20749（2026-10-11 至 2026-11-09，npm 官方下载统计）
- 已发布版本数：57（近 12 个月 57 个）

## 中文简介

一个快速的CLI工具,可以将AI代理配置和MCP服务器同步到Claude,Copilot,Cursor,并更多使用符号链接.

## 安装

```sh
npm install @dallay/agentsync
```

也可以使用：`pnpm add @dallay/agentsync`、`yarn add @dallay/agentsync`、`bun add @dallay/agentsync`

## README

# @dallay/代理服务器

[![npm version](https://img.shields.io/npm/v/@dallay/agentsync.svg)](https://www.npmjs.com/package/@dallay/agentsync)  
[![license](https://img.shields.io/npm/l/@dallay/agentsync.svg)](https://github.com/dallay/agentsync/blob/main/LICENSE)  
[![repository](https://img.shields.io/badge/repo-dallay%2Fagentsync-blue)](https://github.com/dallay/agentsync)

使用符号链接和直观CLI,将AI代理配置顺利同步到Copilot,Claude,Cursor等工具和其他MCP相容服务器之间.

🌟 **[在此探索完整文档](https://dallay.github.io/agentsync/)**

* * *

## 关键特性

-   **简单 CLI**: 以最小设置管理符号链接.
-   **多援助支助**:可兼容横跨Copilot,克洛德,双子座,Cursor,VS代码,OpenCode和多32+助手. 见主要文件中的完整清单和文件位置: [https://dallay.github.io/agentsync/ 页面存档备份,存于互联网档案馆](https://dallay.github.io/agentsync/) (或复出读取.
-   **跨平台二进制**:可用于Linux,MacOS,和Windows.
-   **节点集成**: 在应用程序中按程序使用.

* * *

## \* 安装

确保安装了Node.js(QQ18).

### 使用 `pnpm` (建议):

```bash
pnpm install -g @dallay/agentsync
```

### 使用 `npm`数字 :

```bash
npm install -g @dallay/agentsync
```

### 使用 `yarn`数字 :

```bash
yarn global add @dallay/agentsync
```

### 使用 `bun`数字 :

```bash
bun add -g @dallay/agentsync
```

验证安装 :

```bash
agentsync --help
```

* * *

## 使用量

### 管理配置

#### 同步配置 :

运行以下操作以创建您 AI 编码助手之间的符号链接 :

```bash
agentsync apply
```

要管理的代理同步默认值 `.gitignore` 模式 (`[gitignore].enabled = true`),这是大多数球队推荐的起步点. 如果你的团队有意 实施特工Sync管理的目的地,治疗 `[gitignore].enabled = false` 作为选择退出的工作流程而不是新的默认。 全向导 : [https://dallay.github.io/agentsync/guides/gitignore-team-workflows/ 互联网档案馆的存檔,存档日期2014-12-22](https://dallay.github.io/agentsync/guides/gitignore-team-workflows/)

从视窗跑来? 使用本地同名链接先决条件的设置指南, WSL 作为可选的下游平滑路径, 以及校验步骤 : [https://dallay.github.io/agentsync/guides/windows-symlink-setup/ (中文(中国大陆) )](https://dallay.github.io/agentsync/guides/windows-symlink-setup/)

#### 干净配置 :

删除先前创建的符号链接 :

```bash
agentsync clean
```

🎯 **工作流程示例**数字 :

-   **节点使用程序**数字 :
    
    ```javascript
    const { main } = require('@dallay/agentsync');
    
    main(['apply']).catch((error) => {
       console.error(error);
       process.exit(1);
    });
    ```
    
-   **与 npm 脚本融合**数字 : 将配置同步添加到您的 npm 脚本中, 使进程工作流程自动化 . 比如说,你 `package.json`数字 :
    
    ```json
    {
      "scripts": {
        "precommit": "pnpm exec agentsync apply --dry-run",
        "prepare": "pnpm exec agentsync apply"
     }
    }
    ```
    
    如果你的团队也想要 `agentsync apply` 以在分支开关、合并或再基后运行,请参见为Lefthook、Husky提供的Git钩自动化指南, `simple-git-hooks`,和本地的 Git 钩子示例 : [https://dallay.github.io/agentsync/guides/git-hook-automation/ 页面存档备份,存于互联网档案馆](https://dallay.github.io/agentsync/guides/git-hook-automation/)
    
-   关于复杂的工作流程,见 [详细的 API 文件](https://dallay.github.io/agentsync/)。 。 。 .
    

## MCP 技能和技能

-   **克劳德代码** —— 说 `.mcp.json` (代理人编号: `claude`)——JSON;标准格式
-   **克劳德桌面** —— 说 `Global OS-dependent config` (代理人编号: `claude-desktop`—— JSON; 全球; 默认已禁用
-   **GitHub 副驾驶** —— 说 `.vscode/mcp.json` (代理人编号: `copilot`——JSON;与VS代码共享
-   **OpenAI 代码 CLI** —— 说 `.codex/config.toml` (代理人编号: `codex`—— TOML; 地图头到 http headers
-   **双子座CLI** —— 说 `.gemini/settings.json` (代理人编号: `gemini`——JSON;添加信任:真实
-   **VS 代码** —— 说 `.vscode/mcp.json` (代理人编号: `vscode`——JSON;与GitHub副驾驶共享
-   **光标** —— 说 `.cursor/mcp.json` (代理人编号: `cursor`)——JSON;标准格式
-   **打开代码** —— 说 `opencode.json` (代理人编号: `opencode`)——JSON;标准格式
-   **Z码** —— 说 `.zcode/config.json` (代理人编号: `zcode`) — JSON; 使用 mcp. servers 对象并保存其他 Z 代码设置
-   **迷你麦克斯码** —— 说 `.mcp.json` (代理人编号: `minimax`)——JSON;项目一级标准格式

-   该清单由打入的登记册和重点明确的CI验证人管辖.
-   技能生活在 `.agents/skills/` 在项目.

* * *

## 发展

此软件包是 [代理同步单重播](https://github.com/dallay/agentsync)它作为高性能Rust核的节点Js包装器.

### 先决条件

-   [小时](https://pnpm.io/): 依赖管理器.
-   [节点.js](https://nodejs.org/) qq 22.222.0(促进发展).
-   [锈](https://www.rust-lang.org/):用于构建核心CLI.

### 步骤

1.  清除仓库 :
    
    ```bash
    git clone https://github.com/dallay/agentsync.git
    cd agentsync
    ```
    
2.  安装依赖性 :
    
    ```bash
    pnpm install
    ```
    
3.  构建 :
    
    ```bash
    make js-build
    # or
    pnpm run build
    ```
    
4.  进行测试和类型检查 :
    
    ```bash
    make js-test
    # or
    pnpm run typecheck
    ```
    
5.  格式 :
    
    ```bash
    make fmt
    ```
    

* * *

## \* 解决问题

### `PNPM_NO_MATURE_MATCHING_VERSION`

若为 `pnpm install` 可能是由于严格的包放出年龄政策 您可以尝试安装 `--ignore-scripts` 或等待软件包在登记册中“成熟”.

### 左倾安装失败

若为 `pnpm install` 失败 `lefthook` 设置,您可以尝试:

```bash
pnpm install --ignore-scripts
```

* * *

## 资源

-   **项目仓库**数字 : [GitHub 仓库](https://github.com/dallay/agentsync)
-   **提交问题**数字 : [GitHub 问题](https://github.com/dallay/agentsync/issues)
-   **探索完整的文档**数字 : [文件网站](https://dallay.github.io/agentsync/)

* * *

## 许可证

MIT许可证。 见 [自由主义](https://github.com/dallay/agentsync/blob/main/LICENSE) 详细情况.

* * *

## 承认

特别感谢开发者社区的贡献和反馈。 对于建议和改进,请随意打开拉出请求!

* * *

准备好了吗? 今天开始同步代理配置 `@dallay/agentsync`来啊!

## 常见问题

### @dallay/agentsync 是什么？

一个快速的CLI工具,可以将AI代理配置和MCP服务器同步到Claude,Copilot,Cursor,并更多使用符号链接\.

### 如何安装 @dallay/agentsync？

在项目目录运行 npm install @dallay/agentsync，或使用 pnpm add / yarn add / bun add。它还提供命令行工具 agentsync，可以用 npx agentsync 直接运行。

### @dallay/agentsync 支持 TypeScript 吗？

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

### @dallay/agentsync 支持 ESM 还是 CommonJS？

以 CommonJS 形式发布，可以直接 require\(\)；在 ES Module 项目中也可以用 import 引入（Node\.js 会把 module\.exports 作为默认导出）。

### @dallay/agentsync 需要什么版本的 Node\.js？

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

### @dallay/agentsync 可以商用吗？

@dallay/agentsync 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @dallay/agentsync 的下载量有多少？

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

### @dallay/agentsync 还在维护吗？

最新版本 1\.53\.1 发布于 2026/11/09（1 天前）；至今共发布 57 个版本，其中过去 12 个月发布了 57 个；首次发布于 2026/01/16。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

