Airsc miễn phí cho tất cả. Nếu nó giúp bạn, hãy ủng hộ $2–$20.

Ủng hộ
Cursor ruleAn toànQuy trình & bộ nhớ agentCần cài đặt chút

syncai

dmtrkzntsv · dmtrkzntsv/syncai

SyncAI là một tiện ích đa nền tảng giúp đồng bộ hóa các hướng dẫn, quy tắc và tệp bỏ qua của trợ lý AI trên nhiều coding agent khác nhau.

Đồng bộ hóa các tệp quy tắc và hướng dẫn AI giữa các agent.

10 sao0Giấy phép: MITCập nhật 5 tháng trước0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Duy trì các hướng dẫn coding nhất quán cho một dự án trên người dùng Claude Code và Cursor.
  • Chia sẻ một tập hợp các tệp bị bỏ qua chung (ví dụ: các tạo phẩm xây dựng) để ngăn agent xử lý chúng.
  • Tự động phân phối các kỹ năng hoặc lời nhắc tùy chỉnh đến môi trường coding AI của tất cả thành viên trong nhóm.

Kiểm tra an toàn

An toàn

Không thấy dấu hiệu rủi ro trong các file đã quét.

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README


SyncAI is a lightweight and cross-platform utility that keeps AI-assistant guidelines, rules and ignored files in sync across multiple agents:

  • Cursor
  • GitHub Copilot
  • Claude Code
  • OpenAI Codex
  • OpenCode

It watches the files you specify in a JSON configuration and propagates every change to the corresponding locations for the other agents.

Supported sync types

SyncAI supports four kinds of synced items in agent configurations:

  • context — a single file with general AI guidelines or assistant context (for example AGENTS.md or CLAUDE.md). Configure with context.path. The file is copied verbatim to the target location.

  • rules — a pattern that matches multiple rule files (for example Cursor rules or Copilot instructions). Configure with rules.pattern. If the pattern contains a * wildcard, the wildcard is replaced with the source file's base name when copying.

  • ignore — a single file with instructions telling the assistant what to ignore (for example .copilotignore). Configure with ignore.path. The file is copied verbatim.

  • skills — a directory pattern matching skill folders (for example .claude/skills/*). Each match is treated as a whole skill: every file inside the directory (including nested subfolders, scripts, data, etc.) is mirrored to the equivalent location at every other agent that has a skills pattern. The * wildcard captures the skill's folder name and is substituted into the target pattern. Skill files are copied verbatim. Deletions are propagated and now-empty target directories are cleaned up automatically down to the configured base directory, which is preserved.

These sections can be used together for each agent to keep context, rule files, ignore files, and skill folders in sync across different assistants.

Quick start

  1. Download a suitable binary from the GitHub Releases.
  2. Copy syncai.json to your project and adjust the configuration for your agents.
  3. Launch the binary in the project dir ./syncai.

Configuration

Launching with arguments

  1. Use ./syncai -config {path_to_syncai.json} to start SyncAI with your custom configuration file.
  2. Use ./syncai -workdir {path_to_working_directory} to specify a different working directory.
  3. Use ./syncai -no-watch to sync your files only once, without watching for changes (useful for CI).
  4. Use ./syncai -self-update to update SyncAI to the latest version.

Configuration File

The default configuration is a simple JSON map (for more details check syncai.json):

{
  "config": {
    // sync interval in seconds
    "interval": 5,
    // working directory (optional, default is current directory)
    "workdir": ""
  },
  "agents": [
    {
      // agent name
      "name": "",
      // optional "rules" section
      // GitHub Copilot calls it "instructions", Cursor "rules"
      "rules": {
        "pattern": "./rules/*.md"
      },
      // optional "context" section
      "context": {
        "path": "/path/to/your/guidelines.md"
      },
      // optional "ignore" section
      "ignore": {
        "path": "/path/to/your/ignorefile"
      },
      // optional "skills" section: directory pattern matching skill folders.
      // The `*` is captured as the skill folder name and substituted on the
      // other agents. Every file inside the matched directory (recursively)
      // is mirrored.
      "skills": {
        "pattern": "./skills/*"
      }
    }
  ]
}

How it works

  1. SyncAI loads the configuration file and builds a watch-list of directories and files derived from all sections.
  2. It periodically scans those files for new or updated modification times.
  3. When a rule file changes, its contents are copied to every other agent’s rule directory.

The copying logic is intentionally simple and conservative:

  • The filename is preserved exactly, unless the target pattern contains a * wildcard—in that case, the wildcard is replaced with the source file’s base name.
  • Destination directories are created as needed.

How to build

To build SyncAI manually, follow the next steps:

cd syncai

make build
Xem mã nguồn trên GitHub