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/*.mdcfiles - Gemini needs
GEMINI.mdand.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:
.ai/ (single source)
├── instructions.md # Main instructions
├── rules/ # Rules with YAML frontmatter
│ ├── general.md
│ ├── typescript.md
│ └── forms.md
├── commands/ # Available commands
│ ├── deploy.md
│ └── test.md
└── mcp.json # MCP server configuration
↓ Generates ↓
CLAUDE.md # Claude Code instructions
GEMINI.md # Gemini instructions (identical to Claude)
AGENTS.md # Agents instructions (identical to Claude)
.mcp.json # MCP server config
.cursor/rules/*.mdc # Cursor rules (preserves frontmatter)
.gemini/settings.json # Gemini MCP settings
opencode.json # OpenCode MCP config
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.
# If you have bun installed
bunx dot-ai@latest
# If you don't have bun installed
npx bun x dot-ai@latest# Initialize .ai/ folder structure or migrate existing configs (one-time setup)
bun dot-ai@latest init
# Generate all AI provider configs from .ai/ folder
bun dot-ai@latest runinit- Initialize .ai/ folder structure or migrate existing configsrun- 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:
# Project Instructions
Follow these guidelines when working on this project...Rule files with YAML frontmatter that define specific coding standards:
---
title: TypeScript Rules
enabled: true
priority: 1
---
# TypeScript Guidelines
- Always use explicit types
- Avoid `any` type
- Use strict modeDocumentation for available commands (included in instruction files):
# Deploy Command
Handles deployment to production environments.
## UsageMCP server configuration that gets distributed to all providers:
{
"mcpServers": {
"filesystem": {
"type": "stdio",
"command": "npx",
"args": ["@modelcontextprotocol/server-filesystem", "/tmp"]
}
}
}| File | Description | Content |
|---|---|---|
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:
git checkout -b migrate-to-dot-aibun dot-ai@latest initThis 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.jsonsince these will be auto-generated - Keep other configs: Don't remove
.jsonfiles that serve purposes beyond MCP server configuration (like editor settings, build configs, etc.)
Commit the current work so we have a checkpoint.
bun dot-ai@latest runYou 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:
bun dot-ai@latest initThis 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
# Install dependencies
bun install
# Build the project
bun run build
# Test the built CLI
bun link
bun link dot-ai
# Test in another project by running the linked cli
cd ~/my-project
bunx dot-ai run# Run all tests
bun test
# Run type checking
bun typecheckPlease open issues for bugs or feature requests.
MIT License - see LICENSE for details.

