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.0

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.0
File Size Uploaded
ai_rules_sync-1.0.0.tar.gz 16.5 kB Details

Built distribution (wheel)

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

Total release size: 29.8 kB

Release files / ai_rules_sync-1.0.0.tar.gz

Download URL ai_rules_sync-1.0.0.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0a155c9f0f802e334bd7c1a77320d674e7e055eb57e9087ea7a1a2533b94eacb
BLAKE2b-256 checksum
How to use checksums
01d5722d07f0f60f8e0d83ccc710b9fa38b7428b8e80d4ef3a0ec8bd04a51f4a
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.0-py3-none-any.whl

Download URL ai_rules_sync-1.0.0-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f2451767f2e6c00a38d3c066577676b8a23685f4be0bf64b4dfe7b2a78e19bc
BLAKE2b-256 checksum
How to use checksums
0bed08c2e165c8d5258f50bdb9b50f881428f5749cf9aec5b14a067fd391735a
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

1.0.1

2 release files

This release

1.0.0 This release

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