The Problem
If you use AI coding tools, you probably have this mess in your project root:
.cursorrules # Cursor rules
CLAUDE.md # Claude Code instructions
.github/copilot-instructions.md # GitHub Copilot
.windsurfrules # Windsurf rules
.clinerules # Cline rules
.aider.conf.yml # Aider config
Every file says basically the same thing — "This is a Python project using FastAPI, use pytest for testing, follow PEP 8" — but in 6 different formats. When your rules change, you update one file and forget the others. Your tools drift out of sync.
This shouldn't be a problem.
The Solution: dotai
dotai is a CLI that lets you define your AI coding rules once in .ai/config.yml and sync them to every tool you use.
pip install dotai
3-Line Quick Start
dotai init # Auto-detects your project → creates .ai/config.yml
dotai sync # Generates CLAUDE.md, .cursorrules, copilot-instructions.md, etc.
dotai status # Shows which configs exist and their sync status
That's it. One config, six tools, zero drift.
How It Works
1. Initialize your project
$ dotai init
╭──── dotai init ────╮
│ Created .ai/config.yml
│
│ Project: myapp
│ Language: python
│ Framework: fastapi
│ Linter: ruff
│ Tests: pytest
╰────────────────────╯
dotai auto-detects your language, framework, linter, and test runner by scanning pyproject.toml, package.json, go.mod, Cargo.toml, and more.
2. Customize your rules
# .ai/config.yml
version: 1
project:
name: myapp
language: python
framework: fastapi
rules:
- Write clean, readable code
- Use type hints for all function signatures
- Always handle errors explicitly
- Write tests for new features
style:
formatting: black
linting: ruff
line_length: 88
testing:
framework: pytest
coverage_target: 90
3. Sync to all tools
$ dotai sync
┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┓
┃ Tool ┃ File ┃ Status ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━┩
│ Claude Code │ CLAUDE.md │ written │
│ Cursor │ .cursorrules │ written │
│ GitHub Copilot │ .github/copilot-instructions.md │ written │
│ Windsurf │ .windsurfrules │ written │
│ Cline │ .clinerules │ written │
│ Aider │ .aider.conf.yml │ written │
└────────────────┴─────────────────────────────────┴─────────┘
Synced 6 tool(s)
Each adapter generates the config in the tool's native format. Claude gets Markdown, Aider gets YAML, etc.
Architecture
.ai/config.yml (single source of truth)
│
├──→ ClaudeAdapter → CLAUDE.md
├──→ CursorAdapter → .cursorrules
├──→ CopilotAdapter → .github/copilot-instructions.md
├──→ WindsurfAdapter → .windsurfrules
├──→ ClineAdapter → .clinerules
└──→ AiderAdapter → .aider.conf.yml
The adapter pattern makes it trivial to add new tools. Each adapter inherits from BaseAdapter and implements generate() to transform the central config into the tool's format.
Full CLI Commands
| Command | Description |
|---|---|
dotai init |
Auto-detect project and create .ai/config.yml
|
dotai sync |
Generate all tool configs from central config |
dotai sync --tool claude |
Sync only a specific tool |
dotai status |
Show which tool configs exist |
dotai add "rule" |
Add a rule to config |
dotai remove "rule" |
Remove a rule |
dotai rules |
List all rules |
dotai diff |
Preview what would change on sync |
dotai import claude |
Import rules from existing CLAUDE.md |
dotai tools |
List all supported tools |
What I Learned
The adapter pattern scales beautifully. Adding a new tool is ~50 lines of code — just implement
generate().Auto-detection is more valuable than you think. Running
dotai initin a Python project and having it figure out ruff, pytest, and FastAPI automatically saves 5 minutes of setup — but more importantly, it means you don't forget to configure something.YAML config > individual tool configs. Having one structured config means you can version it, diff it, share it across repos, and lint it. You can't do that with 6 scattered dotfiles.
Try It
pip install dotai
cd your-project
dotai init
dotai sync
GitHub: github.com/LakshmiSravyaVedantham/dotai
57 tests, 83% coverage, CI green on Python 3.9-3.13.
If you use multiple AI coding tools, give it a try and let me know what tools you'd like supported next. PRs welcome!
Top comments (2)
CAN YOU HELP ME TO TEACH IF YOU DONT CARE?
HELLO MY MY FRIEND