@dallay/agentsync

中文文档
1.53.1发布于 2026/11/09MITCommonJS零依赖构建来源已验证近 30 天下载 2.1万

A fast CLI tool to sync AI agent configurations and MCP servers across Claude, Copilot, Cursor, and more using symbolic links.

原始使用文档
文档目录18 节
  1. ✨ Key Features
  2. 🚀 Installation
  3. Using pnpm (recommended):
  4. Using npm :
  5. Using yarn :
  6. Using bun :
  7. 🛠️ Usage
  8. Managing Configurations
  9. MCP & Skills
  10. 👷 Development
  11. Prerequisites
  12. Steps
  13. 🛠️ Troubleshooting
  14. PNPM_NO_MATURE_MATCHING_VERSION
  15. Lefthook installation failure
  16. 🌐 Resources
  17. 📜 License
  18. 🙏 Acknowledgments

@dallay/agentsync

npm version
license
repository

Effortlessly synchronize AI agent configurations across tools like Copilot, Claude, Cursor, and other MCP-compatible servers using symbolic links and an intuitive CLI.

🌟 Explore the Full Documentation Here


✨ Key Features

  • Simple CLI: Manage symbolic links with minimal setup.
  • Multi-assistant support: Compatible across Copilot, Claude, Gemini, Cursor, VS Code, OpenCode and 32+ more assistants. See the full list and file locations in the main documentation: https://dallay.github.io/agentsync/ (or the repo README).
  • Cross-platform binaries: Available for Linux, MacOS, and Windows.
  • Node.js integration: Use programmatically within your applications.

🚀 Installation

Make sure you have Node.js (>=18) installed.

pnpm install -g @dallay/agentsync

Using npm:

npm install -g @dallay/agentsync

Using yarn:

yarn global add @dallay/agentsync

Using bun:

bun add -g @dallay/agentsync

Verify installation:

agentsync --help

🛠️ Usage

Managing Configurations

Sync Configurations:

Run the following to create symbolic links across your AI coding assistants:

agentsync apply

AgentSync defaults to managed .gitignore mode ([gitignore].enabled = true), which is the recommended starting point for most teams. If your team intentionally wants to commit AgentSync-managed destinations, treat [gitignore].enabled = false as an opt-out workflow instead of a new default. Full guide: https://dallay.github.io/agentsync/guides/gitignore-team-workflows/

Running from Windows? Use the setup guide for native symlink prerequisites, WSL as an optional lower-friction path, and verification steps: https://dallay.github.io/agentsync/guides/windows-symlink-setup/

Clean Configurations:

Remove previously created symbolic links:

agentsync clean

🎯 Example Workflows:

  • Programmatic Usage in Node.js:

    const { main } = require('@dallay/agentsync');
    
    main(['apply']).catch((error) => {
       console.error(error);
       process.exit(1);
    });
    
  • Integrate with npm scripts: Add configuration syncing to your npm scripts to automate process workflows. For example, in your package.json:

    {
      "scripts": {
        "precommit": "pnpm exec agentsync apply --dry-run",
        "prepare": "pnpm exec agentsync apply"
     }
    }
    

    If your team also wants agentsync apply to run after branch switches, merges, or rebases, see the Git hook automation guide for Lefthook, Husky, simple-git-hooks, and native Git hook examples: https://dallay.github.io/agentsync/guides/git-hook-automation/

  • For complex workflows, see the detailed API documentation.

MCP & Skills

  • Claude Code — .mcp.json (agent id: claude) — JSON; Standard format
  • Claude Desktop — Global OS-dependent config (agent id: claude-desktop) — JSON; Global; disabled by default
  • GitHub Copilot — .vscode/mcp.json (agent id: copilot) — JSON; Shared with VS Code
  • OpenAI Codex CLI — .codex/config.toml (agent id: codex) — TOML; Maps headers to http_headers
  • Gemini CLI — .gemini/settings.json (agent id: gemini) — JSON; Adds trust: true
  • VS Code — .vscode/mcp.json (agent id: vscode) — JSON; Shared with GitHub Copilot
  • Cursor — .cursor/mcp.json (agent id: cursor) — JSON; Standard format
  • OpenCode — opencode.json (agent id: opencode) — JSON; Standard format
  • Z-Code — .zcode/config.json (agent id: zcode) — JSON; Uses the mcp.servers object and preserves other Z-Code settings
  • MiniMax Code — .mcp.json (agent id: minimax) — JSON; Project-level standard format
  • The typed registry and focused CI validator govern this list.
  • Skills live under .agents/skills/ in the project.

👷 Development

This package is part of the AgentSync mono-repo. It serves as a Node.js wrapper for the high-performance Rust core.

Prerequisites

  • pnpm: Dependency manager.
  • Node.js >= 22.22.0 (for development).
  • Rust: For building the core CLI.

Steps

  1. Clone the repository:

    git clone https://github.com/dallay/agentsync.git
    cd agentsync
    
  2. Install dependencies:

    pnpm install
    
  3. Build:

    make js-build
    # or
    pnpm run build
    
  4. Run tests and type checks:

    make js-test
    # or
    pnpm run typecheck
    
  5. Format:

    make fmt
    

🛠️ Troubleshooting

PNPM_NO_MATURE_MATCHING_VERSION

If pnpm install fails with this error, it's likely due to a strict package release age policy. You can try installing with --ignore-scripts or wait for the package to "mature" in the registry.

Lefthook installation failure

If pnpm install fails during the lefthook setup, you can try:

pnpm install --ignore-scripts

🌐 Resources


📜 License

MIT License. See the LICENSE for details.


🙏 Acknowledgments

Special thanks to the developer community for their contributions and feedback. For suggestions and improvements, feel free to open a pull request!


📣 Ready? Start syncing agent configs today with @dallay/agentsync!

版本与发布记录

@dallay/agentsync 共发布 57 个版本,首次发布于 2026/01/16;过去 12 个月发布了 57 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.53.1latest2026/11/091 天前
1.52.32026/10/2319 天前
1.52.22026/10/2022 天前
1.52.12026/10/1725 天前
1.52.02026/10/111 个月前
1.51.02026/09/241 个月前

关于 @dallay/agentsync 的常见问题

@dallay/agentsync 是什么?

A fast CLI tool to sync AI agent configurations and MCP servers across Claude, Copilot, Cursor, and more using symbolic links.

如何安装 @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 和提交记录判断。