Generate AI provider configurations from a centralized .ai/ folder
A CLI tool that reads from a single .ai/ directory and generates configuration files for multiple AI assistants and code editors, eliminating duplicate configs across Claude Code, Cursor, Gemini, and OpenCode.
Modern development often involves multiple AI assistants and code editors, each requiring their own configuration files:
- Claude Code needs CLAUDE.md
- Cursor needs .cursor/rules/*.mdc files
- Gemini needs GEMINI.md and .gemini/settings.json
- Codex needs AGENTS.md
- OpenCode needs opencode.json
- MCP servers need .mcp.json
This leads to scattered configs and duplicate content across your project.
dot-ai provides a single source of truth in a .ai/ folder that generates all provider-specific configurations:
↓ Generates ↓
dot-ai is intended as a stop-gap solution. The ultimate goal is for AI model providers and development tools to standardize on a single configuration format, so every provider and CLI tool reads from the same place. When that happens, this project will be deprecated.
Until that standardization happens, dot-ai helps eliminate the pain of maintaining duplicate configurations across multiple tools. We hope this project becomes obsolete as the ecosystem matures and converges on unified standards.
- init - Initialize .ai/ folder structure or migrate existing configs
- run - Generate provider-specific configs from .ai/ folder
The run command will:
- Read your .ai/ folder structure
- Generate provider-specific configuration files
- Preserve YAML frontmatter where needed (Cursor)
- Transform MCP configs to each provider's format
Main instructions that will be included in CLAUDE.md, GEMINI.md, and AGENTS.md:
Rule files with YAML frontmatter that define specific coding standards:
Documentation for available commands (included in instruction files):
MCP server configuration that gets distributed to all providers:
CLAUDE.md | Claude Code instructions | instructions + rules (no frontmatter) + commands |
GEMINI.md | Gemini instructions | Identical to CLAUDE.md |
AGENTS.md | Agents instructions | Identical to CLAUDE.md |
.mcp.json | MCP server config | Direct copy of .ai/mcp.json |
.cursor/rules/*.mdc | Cursor rules | Individual rule files with frontmatter preserved |
.gemini/settings.json | Gemini MCP settings | { "mcpServers": { ... } } |
opencode.json | OpenCode MCP config | { "mcp": { "server": { "type": "local", "command": [...] } } } |
If you have existing AI configs, follow this workflow to safely migrate:
This creates a .ai/ folder by consolidating your existing configs:
- CLAUDE.md, GEMINI.md, AGENTS.md → .ai/instructions.md
- .cursor/rules/*.mdc → .ai/rules/*.md
- Various MCP configs → .ai/mcp.json
Important: The migration may concatenate multiple files or create duplicate MCP configs. Edit the files as needed to remove duplicates and organize content properly.
Once satisfied with .ai/ folder, remove the original AI-specific files:
- Always remove: CLAUDE.md, GEMINI.md, AGENTS.md, .cursor/rules/
- MCP configs: Remove .mcp.json, .gemini/settings.json, opencode.json since these will be auto-generated
- Keep other configs: Don't remove .json files that serve purposes beyond MCP server configuration (like editor settings, build configs, etc.)
Commit the current work so we have a checkpoint.
You can add the generated files to .gitignore if you prefer.
You can now use bun dot-ai@latest run whenever you update .ai/ configs.
If you don't have existing AI configs, initialize a new .ai/ folder by running:
This will create the .ai/ folder structure and example files to get you started.
Contributions are welcome! This project aims to:
- Support more providers as they emerge
- Improve configuration mapping between formats
- Eventually become unnecessary once standards emerge
Please open issues for bugs or feature requests.
MIT License - see LICENSE for details.