CLI tool to manage AI rules across different AI coding agents. Standardize and distribute your coding guidelines across AMP, Claude, Cline, Codex, Copilot, Cursor, Firebender, Gemini, Goose, Kilocode, and Roo.
- Multi-Agent Support - Generate rules for 11 AI coding agents from a single source
- Sync Management - Track and maintain consistency across all generated rule files
- Selective Generation - Generate rules for specific agents only
- MCP Support - Generate Model Context Protocol configurations for compatible agents
curl -fsSL https://raw.githubusercontent.com/block/ai-rules/main/scripts/install.sh | bashInstalls to ~/.local/bin/ai-rules. Verify with ai-rules --version.
More installation options
Specific version:
curl -fsSL https://raw.githubusercontent.com/block/ai-rules/main/scripts/install.sh | VERSION=v1.0.0 bashCustom directory:
curl -fsSL https://raw.githubusercontent.com/block/ai-rules/main/scripts/install.sh | INSTALL_DIR=/usr/local/bin bash-
Initialize your AI rules directory:
ai-rules init
Creates an
ai-rules/directory with example rule files. Rule files are markdown files containing coding guidelines, conventions, and instructions that get distributed to your AI coding agents. -
Edit your rules in
ai-rules/*.mdfiles to define your project's coding standards -
Generate agent-specific files:
ai-rules generate # All agents ai-rules generate --agents claude,cursor # Specific agents
Creates
CLAUDE.md,.cursor/rules/*.mdc,AGENTS.md, etc. -
Check status to ensure everything is in sync:
ai-rules status
| Command | Description |
|---|---|
ai-rules init |
Initialize AI rules in the current directory |
ai-rules generate |
Generate rules for AI coding agents |
ai-rules status |
Show sync status of AI rules |
ai-rules clean |
Remove all generated files |
ai-rules list-agents |
List all supported agents |
ai-rules generate --agents claude,cursor # Generate for specific agents
ai-rules generate --nested-depth 2 # Process subdirectories
ai-rules generate --gitignore # Add generated files to .gitignoreCreate ai-rules/ai-rules-config.yaml to set defaults:
agents: [claude, cursor, cline]
nested_depth: 2
gitignore: trueSee Configuration Guide for all options.
AMP, Claude Code, Cline, Codex, Copilot, Cursor, Firebender, Gemini, Goose, Kilocode, Roo
See Supported Agents for detailed compatibility information.
- Configuration - Config file options and precedence
- Rule Format - Standard mode and symlink mode formats
- Supported Agents - Agent compatibility and generated files
- MCP Configuration - Model Context Protocol setup
- Commands and Skills - Custom commands and skills
- Project Structure - Example project layouts
See CONTRIBUTING.md for development setup and guidelines.