A Go-based CLI tool that compiles AI rule templates into target-specific formats for various AI coding assistants including Cursor, Claude Code, Cline, GitHub Copilot, Gemini CLI, and Roo Code.
Stop duplicating your AI coding rules across multiple tools.
If you're using Cursor, Claude Code, Cline, GitHub Copilot, Gemini CLI, and Roo Code, you know the pain: maintaining the same coding standards and project rules across completely different file formats and locations.
airuler solves this by letting you write your rules once as templates, then automatically:
- Generate the correct format for each AI assistant
- Install rules to the right locations (global configs or project directories)
- Update all installations instantly when templates change
- π― Multi-target compilation: Generate rules for Cursor, Claude Code, Cline, GitHub Copilot, Gemini CLI, and Roo Code
- π¦ Vendor management: Fetch and manage rule templates from Git repositories
- π Template inheritance: Support for template partials and reusable components
- πΎ Safe installation: Automatic backup of existing rules and installation tracking
- π Watch mode: Auto-compile templates during development
- βοΈ Flexible configuration: YAML-based configuration with vendor-specific settings
- π§ Claude Code modes: Memory (persistent) and command (on-demand) installation modes
- ποΈ Vendor configuration: Per-vendor defaults, variables, and compilation settings
Download the latest release for your platform from the GitHub releases page.
# Extract and move to your PATH
tar -xzf airuler_*_linux_amd64.tar.gz
sudo mv airuler_*_linux_adm64/airuler /usr/local/bin/
# Pull the latest image
docker pull ratler/airuler:latest
# Or run directly
docker run --rm -v $(pwd):/workspace ratler/airuler:latest version
git clone https://github.com/ratler/airuler
cd airuler
go build -o airuler
airuler init
This creates a project structure with templates/
, compiled/
, vendors/
directories and configuration files.
Create templates/my-coding-rules.tmpl
:
---
claude_mode: memory
description: "Project coding standards"
globs: "**/*"
language: "TypeScript"
---
# {{.Name}} Coding Standards
This document outlines coding standards for our {{.Language}} project.
## Core Principles
- Write clean, readable code
- Follow language-specific conventions
- Include comprehensive tests
- Document complex logic
{{if eq .Target "claude"}}
When reviewing or writing code:
1. Check for adherence to these standards
2. Suggest improvements when standards aren't met
3. Explain the reasoning behind recommendations
{{end}}
# Deploy to global AI agent configs
airuler deploy
# Deploy to specific project directory
airuler deploy --project ./my-project
# Deploy for specific target
airuler deploy cursor
# Interactive template selection
airuler deploy --interactive
# Full sync: git pull β update vendors β compile β update installed templates
airuler sync
# Sync for specific target only
airuler sync claude
# Skip git pull and vendor updates
airuler sync --no-update
# Skip git pull only
airuler sync --no-git-pull
Target | Format | Location | Features |
---|---|---|---|
Cursor | .mdc files |
.cursor/rules/ |
YAML front matter, globs, alwaysApply |
Claude Code | .md files |
.claude/commands/ or CLAUDE.md |
Memory/command modes, $ARGUMENTS placeholder |
Cline | .md files |
.clinerules/ |
Plain markdown rules |
GitHub Copilot | .md files |
.github/copilot-instructions.md |
Combined into single file |
Gemini CLI | .md files |
~/.gemini/GEMINI.md or GEMINI.md |
Combined into single file, global & project support |
Roo Code | .md files |
.roo/rules/ |
Plain markdown rules |
# Project Setup
airuler init # Initialize project
airuler config init # Initialize global config
# Core Workflow
airuler deploy # Compile templates and install fresh
airuler deploy --interactive # Interactive template selection
airuler sync # Update vendors + compile + update installed templates
airuler watch # Development mode with auto-compile
# Management
airuler manage # Interactive management hub
airuler manage installations # View installed templates
airuler manage uninstall # Remove installed templates
airuler manage uninstall --all # Remove all installations
# Vendor Management
airuler vendors add <url> # Add external template repository
airuler vendors list # List vendors with config details
airuler vendors update # Update vendor repositories
airuler vendors include <name> # Include vendor in compilation
airuler vendors remove <name> # Remove vendor
# Configuration
airuler config path # Show config locations
airuler config set-template-dir # Set default template directory
For detailed information, see:
- Command Reference - Complete command and flag reference
- Template Syntax - Template variables, functions, partials, and Claude Code modes
- Vendor Management - Adding and managing external rule repositories
- Configuration - YAML configuration, global settings, and template directories
- Installation Management - Installation tracking, updates, and uninstallation
- Examples & Best Practices - Advanced examples and development workflows
# Build and test
make build
make test
# Template development with auto-reload
airuler watch
# Format and lint
make fmt
make lint
MIT License
airuler helps you maintain consistent AI coding assistant rules across different tools and projects through a unified template system.