DEV Community

Lakshmi Sravya Vedantham
Lakshmi Sravya Vedantham

Posted on

I Built dotai — One Config for All Your AI Coding Tools

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
╰────────────────────╯
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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)
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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

  1. The adapter pattern scales beautifully. Adding a new tool is ~50 lines of code — just implement generate().

  2. Auto-detection is more valuable than you think. Running dotai init in 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.

  3. 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
Enter fullscreen mode Exit fullscreen mode

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)

Collapse
 
shamsi_chande_9f086ef28b1 profile image
SHAMSI CHANDE

CAN YOU HELP ME TO TEACH IF YOU DONT CARE?

Collapse
 
shamsi_chande_9f086ef28b1 profile image
SHAMSI CHANDE

HELLO MY MY FRIEND