Skip to main content

AI Rules Sync

AI Rules Sync 是一个只依赖 Python 标准库的跨平台命令行工具,用一份中文代码注释规范同步多个 AI 编程 Agent 的全局规则。

使用方式

无需克隆仓库或安装 Python 包,直接使用 uvx

# 查看当前电脑检测到的 Agent
uvx ai-rules-sync --list

# 同步规则
uvx ai-rules-sync

# 预览变更,不写入文件
uvx ai-rules-sync --dry-run

# 检查是否需要同步;需要同步时返回退出码 1
uvx ai-rules-sync --check

# 只同步指定 Agent
uvx ai-rules-sync --agents codex,claude

也可以指定配置目录:

uvx ai-rules-sync --config-dir /path/to/config

支持的 Agent

内置支持 Codex、Claude Code、Hermes 和 Qoder。工具会自动检测已安装的 Agent;未检测到的 Agent 会跳过,不会创建配置目录。使用 --agents 可以显式初始化指定 Agent。

同步过程只替换受管标记内的规则内容,会保留 Agent 原有配置,并在写入前创建备份。

本机配置

共享规则随 PyPI wheel 一起发布。安装后的本机覆盖配置和备份默认保存在:

  • macOS/Linux:~/.config/ai-rules-sync/
  • Windows:%APPDATA%\\ai-rules-sync\\

也可以通过 AI_RULES_HOME--config-dir 指定配置目录。完整的配置格式、安全策略和开发说明请参阅项目中的 使用说明书

Release files for ai-rules-sync 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai-rules-sync 1.0.1
File Size Uploaded
ai_rules_sync-1.0.1.tar.gz 18.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-rules-sync 1.0.1
File Interpreter ABI Platform
ai_rules_sync-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 33.2 kB

Release files / ai_rules_sync-1.0.1.tar.gz

Download URL ai_rules_sync-1.0.1.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bbf1bdabf85c4b34944a605c49d6628e576bb58f6ecf081645a797eba5c34a71
BLAKE2b-256 checksum
How to use checksums
39ed2eb9ccb089e40f5e13ac72ada1f4c0150f03c40028b0ab3e92e4799d79b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / ai_rules_sync-1.0.1-py3-none-any.whl

Download URL ai_rules_sync-1.0.1-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e60d777b3231521d1ca104b532ece3cf21a2b8bd4cef8ab89c9408205b3d107
BLAKE2b-256 checksum
How to use checksums
49a977b822e559c37418f817aeaccdd80cf603124ac30c23ee991673524e1f8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page