[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82861":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":14,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":35,"readmeContent":36,"aiSummary":37,"trendingCount":15,"starSnapshotCount":15,"syncStatus":38,"lastSyncTime":39,"discoverSource":40},82861,"ai-rules-sync","PanisHandsome\u002Fai-rules-sync","PanisHandsome","Keep one source of truth for your AI coding-agent rules. Convert and sync between AGENTS.md, CLAUDE.md, .cursorrules, Copilot, Windsurf, Cline, Aider & Gemini — or scaffold a fresh AGENTS.md. Zero dependencies.","https:\u002F\u002Fpanishandsome.github.io\u002Fai-rules-sync\u002F",null,"JavaScript",120,5,1,0,15,59,6,57.73,"MIT License",false,"main",true,[25,26,27,28,29,30,31,32,33,34],"agents-md","ai","claude","cli","codex","coding-agent","copilot","cursor","developer-tools","llm","2026-06-12 04:01:39","# agentsync\n\n[![npm version](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@panishandsome\u002Fagentsync)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@panishandsome\u002Fagentsync)\n[![npm downloads](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdm\u002F@panishandsome\u002Fagentsync)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@panishandsome\u002Fagentsync)\n[![CI](https:\u002F\u002Fgithub.com\u002FPanisHandsome\u002Fai-rules-sync\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FPanisHandsome\u002Fai-rules-sync\u002Factions\u002Fworkflows\u002Fci.yml)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green.svg)](LICENSE)\n[![Node](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fnode-%3E%3D18-brightgreen)](package.json)\n\n**One source of truth for your AI coding-agent rules.**\n\n🔗 **Live playground: https:\u002F\u002Fpanishandsome.github.io\u002Fai-rules-sync\u002F**\n\n![agentsync playground](docs\u002Fplayground.png)\n\nCodex reads `AGENTS.md`. Claude Code reads `CLAUDE.md`. Cursor reads `.cursorrules`.\nCopilot reads `.github\u002Fcopilot-instructions.md`. Keeping them in sync by hand is\ntedious and they drift. `agentsync` **converts between all of them** — or\n**generates a clean `AGENTS.md`** from a short spec.\n\nZero dependencies. The exact same engine (`src\u002Fcore\u002Fagentsync.js`) powers both the\nCLI and the browser playground.\n\n## Install\n\n```bash\nnpm install -g @panishandsome\u002Fagentsync   # installs the `agentsync` command\n# or run without installing:\nnpx @panishandsome\u002Fagentsync --help\n```\n\nOr just clone and run from source — there are no dependencies:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FPanisHandsome\u002Fai-rules-sync\ncd ai-rules-sync\nnode bin\u002Fagentsync.mjs --help\n```\n\n## Set it up in one command\n\n```bash\nagentsync setup\n```\n\nThat's the lazy path. In your repo it: generates `AGENTS.md` (by scanning the\nproject), writes an `agentsync.json`, runs the first sync, and installs a git\npre-commit hook so every commit keeps the files in sync. From then on you just\nedit `AGENTS.md` and commit. Use `agentsync setup --auto` to let the hook accept\nedits to *any* rule file, or `--no-hook` to skip the hook.\n\n## Quick start (manual)\n\n```bash\n# Point it at your repo and let it write AGENTS.md for you\nagentsync init\n\n# Convert an existing rule file\nagentsync convert .cursorrules --to agents -o AGENTS.md\nagentsync convert CLAUDE.md --to copilot\n\n# Generate from explicit fields instead of scanning\nagentsync generate --name my-app --language TypeScript --framework Next.js \\\n    --test \"pnpm test\" --build \"pnpm build\" -o AGENTS.md\n\n# Check an AGENTS.md for stale commands \u002F missing paths\nagentsync lint AGENTS.md\n```\n\n## Keep one source of truth, sync the rest\n\nWrite `AGENTS.md` once and let the other tools' files be generated from it. Create\nthe config (it auto-detects which rule files you already have):\n\n```bash\nagentsync sync --init      # writes agentsync.json\n```\n\n```json\n{\n  \"source\": \"AGENTS.md\",\n  \"targets\": [\"CLAUDE.md\", \".cursorrules\", \".github\u002Fcopilot-instructions.md\"]\n}\n```\n\n```bash\nagentsync sync            # regenerate every target from AGENTS.md\nagentsync sync --watch    # regenerate on every save\nagentsync sync --check    # CI: exit non-zero if anything is out of sync\n```\n\nMake it automatic with a pre-commit hook (so the committed files are always in sync):\n\n```bash\nnpx husky init\necho \"npx agentsync sync && git add -A\" > .husky\u002Fpre-commit\n```\n\nEdit only `AGENTS.md` from then on — the other files are generated outputs.\n\n### Don't want to be tied to one file? Use `--auto`\n\nWith `--auto` you can edit **whichever** file your current tool prefers (CLAUDE.md in\nClaude Code, `.cursorrules` in Cursor, AGENTS.md in Codex…). agentsync tracks a\nsnapshot in `.agentsync-state.json`, figures out which file you changed, and\nregenerates the rest from it:\n\n```bash\nagentsync sync --auto\n```\n\nIf you edited two files since the last sync, it stops and asks which one wins:\n\n```bash\nagentsync sync --auto --source CLAUDE.md\n```\n\nHook it up the same way: `echo \"npx agentsync sync --auto && git add -A\" > .husky\u002Fpre-commit`.\n\n## Merge existing files into one\n\nAlready have several rule files? Fold them into a single `AGENTS.md`:\n\n```bash\nagentsync merge CLAUDE.md .cursorrules -o AGENTS.md\n```\n\n## Try it in the browser\n\n**→ https:\u002F\u002Fpanishandsome.github.io\u002Fai-rules-sync\u002F** — paste any rule file on the\nleft, see the converted output on the right, or switch to **Generate** mode and\nfill in a short form. Runs entirely client-side; nothing is uploaded.\n\nTo run the playground locally:\n\n```bash\nnpm run web      # → http:\u002F\u002Flocalhost:5173\n```\n\n## Supported formats\n\n| id        | file                                  | tool          |\n|-----------|---------------------------------------|---------------|\n| `agents`  | `AGENTS.md`                           | Codex \u002F open standard |\n| `claude`  | `CLAUDE.md`                           | Claude Code   |\n| `cursor`  | `.cursorrules`                        | Cursor        |\n| `copilot` | `.github\u002Fcopilot-instructions.md`     | GitHub Copilot|\n| `windsurf`| `.windsurfrules`                      | Windsurf      |\n| `cline`   | `.clinerules`                         | Cline         |\n| `aider`   | `CONVENTIONS.md`                      | Aider         |\n| `gemini`  | `GEMINI.md`                           | Gemini CLI    |\n| `qwen`    | `QWEN.md`                             | Qwen Code     |\n\nRun `agentsync formats` to list them.\n\n## How it works\n\nEvery format is parsed into one normalized intermediate representation (sections,\nintro, file globs, warnings), then rendered into the target format. Adding a new\ntool means writing one parser and one renderer — nothing else changes. Tool-specific\nconstructs that don't translate (Cursor's `globs` frontmatter, Claude's `@path`\nimports) surface as **warnings** instead of being silently dropped.\n\nFlat, heading-less rule files are classified semantically: command lines, style\nnotes, and prohibitions are sorted into proper `Build & test commands`, `Code style`\nand `Do not` sections rather than dumped into one blob.\n\n## CLI reference\n\n```\nagentsync init [dir] [-o \u003Cout>] [--force]\nagentsync sync [--check] [--watch]\nagentsync convert \u003Cfile> [--to \u003Cfmt>] [--from \u003Cfmt>] [-o \u003Cout>] [--json]\nagentsync merge \u003Cfile> \u003Cfile> ... [--to \u003Cfmt>] [-o \u003Cout>] [--json]\nagentsync generate --name \u003Cn> [--language ..] [--framework ..] [--test ..] [-o \u003Cout>]\nagentsync lint \u003Cfile> [--strict] [--json]\nagentsync detect \u003Cfile> [--json]\nagentsync formats\n```\n\n## Tests\n\n```bash\nnpm test\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md). The repo's own [`AGENTS.md`](AGENTS.md) was\ngenerated by agentsync itself (`agentsync generate`), so a coding agent can pick up\nthe conventions before touching anything.\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md). A short build journal lives in\n[docs\u002FJOURNAL.md](docs\u002FJOURNAL.md).\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","ai-rules-sync 是一个用于统一管理AI编码助手规则的工具。它能够将AGENTS.md、CLAUDE.md、.cursorrules等不同格式的规则文件相互转换或从零生成新的AGENTS.md文件，确保各平台规则的一致性。该工具使用JavaScript编写，无任何外部依赖，并且支持CLI和Web界面两种操作方式。适用于需要在多种AI编码助手间保持规则同步的开发场景，如Codex, Claude Code, Cursor, Copilot等，通过简单的命令行指令即可完成配置与同步工作，极大简化了多平台规则维护的复杂度。",2,"2026-06-11 04:09:27","CREATED_QUERY"]