@itaromi/airul
v0.1.1
Published
One source of truth for your AI rules. Sync to Claude, Cursor, Copilot, Windsurf and more.
Maintainers
Readme
airul
One source of truth for all your AI coding rules.
Stop maintaining .cursorrules, CLAUDE.md, .windsurfrules separately.
Write your rules once in .airul, sync everywhere.
Install
npm install -g @itaromi/airulUsage
# Initialize a .airul file in your project
airul init
# Generate all AI rule files
airul sync
# Watch mode — auto-sync on save
airul watch
# Install a git pre-commit hook (auto-sync before every commit)
airul add-hook
# Validate generated files are up to date (useful in CI)
airul validateSupported targets
| Tool | File generated |
|------|----------------|
| Claude Code | CLAUDE.md |
| Cursor | .cursorrules |
| GitHub Copilot | .github/copilot-instructions.md |
| Windsurf | .windsurfrules |
| Gemini CLI | GEMINI.md |
The .airul format
# .airul — single source of truth for your AI coding rules
version: 1
targets:
- claude
- cursor
- copilot
- windsurf
- gemini
rules:
- id: lang
content: "Always respond in the same language the user writes in."
- id: stack
content: |
Stack: Next.js 14, TypeScript strict, Tailwind CSS, Prisma + PostgreSQL.
Never use `any`. Prefer TypeScript utility types.
- id: style
content: "React components as arrow functions. No inline CSS classes."
- id: tests
content: "Write Vitest tests for every utility function."
# Rule targeted to specific tools only
- id: commits
content: "Use Conventional Commits format."
only: [claude, cursor]Rule fields
| Field | Required | Description |
|-------|----------|-------------|
| id | yes | Unique identifier |
| content | yes | The rule text (supports multi-line with \|) |
| only | no | Restrict this rule to specific targets |
| except | no | Exclude this rule from specific targets |
Options
airul sync --dry-run # Preview output without writing files
airul sync --targets claude,cursor # Override which targets to sync
airul sync --config path/to/.airul # Use a custom config file
airul sync --quiet # Suppress outputCI usage
Add to your pipeline to ensure rule files are always in sync:
- run: npx @itaromi/airul validateExits with code 1 if any generated file is missing or out of sync.
