ai-ide
v0.0.1
Published
AI IDE 配置软链接管理工具 - 支持 Cursor、CodeBuddy、KiloCode 的配置文件管理
Maintainers
Readme
ai-ide
AI IDE 配置软链接管理工具:一套配置(skills、commands、rules),无缝适配多个 IDE、AI 插件,同步更新,无需反复拷贝。
背景
市场上主流的 AI IDE 和插件众多(Cursor、CodeBuddy、KiloCode 等),但它们各自为政,配置文件格式和目录结构互不兼容。切换 IDE 时需要重新配置,非常麻烦。
然而,这些工具的 rules、workflows、skills、commands 本质上是相同的,只是存放位置不同。本工具通过软链接方式,维护一套统一配置,自动映射到各 IDE 的配置目录。
功能特性
- 🔗 软链接管理:统一管理多个 AI IDE 的配置文件
- 🚀 一键配置:快速创建、清理、验证软链接
- 🎯 多 IDE 支持:Cursor、CodeBuddy、KiloCode
- 📦 零配置启动:内置配置模板,安装即用
- 🔄 智能转换:自动将
rules/*.md转换为 Cursor/CodeBuddy 需要的.mdc格式 - 🛡️ 增量更新:自动检测已有配置,不覆盖
支持的 IDE
| IDE | 配置目录 | 映射配置 |
| --------- | ------------- | ------------------------ |
| Cursor | .cursor/ | skills、commands、rules |
| CodeBuddy | .codebuddy/ | skills、commands、rules |
| KiloCode | .kilocode/ | skills、rules、workflows |
注意:
rules目录在 Cursor 和 CodeBuddy 中会自动转换为.mdc格式。
安装
# 全局安装
npm install -g ai-ide
# 或使用 npx(推荐,无需安装)
npx ai-ide <command>使用方法
全局操作
| 命令 | 说明 |
| --------- | ---------------------- |
| list | 列出所有已支持的 IDE |
| tree | 显示项目目录结构 |
| setup | 创建所有 IDE 的软链接 |
| clean | 清理所有 IDE 的软链接 |
| verify | 验证所有 IDE 的软链接 |
| rebuild | 重建所有 IDE 的软链接 |
| help | 显示帮助信息 |
单个 IDE 操作
# Cursor
ai-ide setup-cursor # 创建软链接
ai-ide clean-cursor # 清理软链接
ai-ide verify-cursor # 验证软链接
# CodeBuddy
ai-ide setup-codebuddy
ai-ide clean-codebuddy
ai-ide verify-codebuddy
# KiloCode
ai-ide setup-kilocode
ai-ide clean-kilocode
ai-ide verify-kilocode快速开始
# 进入项目目录
cd your-project
# 创建所有 IDE 配置软链接
npx ai-ide setup
# 查看配置状态
npx ai-ide verify
# 查看目录结构
npx ai-ide tree工作原理
项目目录/
├── .ai-config/ # 配置源目录(统一维护)
│ ├── skills/ # skills 配置
│ ├── rules/ # rules 配置(.md 格式)
│ └── commands/ # commands 配置
│
├── .cursor/ # → 软链接映射
│ ├── skills/ ──────→ .ai-config/skills
│ ├── commands/ ──────→ .ai-config/commands
│ └── rules/*.mdc ─────→ .ai-config/rules/*.md
│
├── .codebuddy/ # → 软链接映射
│ ├── skills/ ──────→ .ai-config/skills
│ ├── commands/ ──────→ .ai-config/commands
│ └── rules/*.mdc ─────→ .ai-config/rules/*.md
│
└── .kilocode/ # → 软链接映射
├── skills/ ──────→ .ai-config/skills
├── rules/ ──────→ .ai-config/rules
└── workflows/ ──────→ .ai-config/commands配置映射说明
| 源目录 | Cursor | CodeBuddy | KiloCode |
| ------------- | ---------------- | ---------------- | ---------------- |
| skills/ | ✅ skills/ | ✅ skills/ | ✅ skills/ |
| commands/ | ✅ commands/ | ✅ commands/ | ✅ workflows/ |
| rules/*.md | ✅ rules/.mdc | ✅ rules/.mdc | ✅ rules/ |
最佳实践
- 统一维护:只在
.ai-config/目录下增删改配置 - Cursor 新增规则同步:若在 Cursor 中新增
.mdc文件,复制到.ai-config/rules/并改为.md后重新运行setup - 公共配置复用:将通用规则、skills 放入
.ai-config/,其他项目一行命令即可同步
依赖要求
- Node.js: >= 16.0.0
- Make: 系统需安装 make 工具
项目结构
ai-ide/
├── .ai-config/ # 内置配置模板
│ ├── skills/
│ ├── rules/
│ └── commands/
├── bin/
│ ├── cli.js # CLI 入口
│ └── utils.js # 工具函数
├── src/
│ └── ide-mk/ # IDE 配置 Makefile
│ ├── cursor.mk
│ ├── codebuddy.mk
│ └── kilocode.mk
├── makefile # 主 Makefile
└── package.jsonLicense
MIT
