初始化设置 (Setup)
初始化设置 (Setup)
Section titled “初始化设置 (Setup)”OMC 框架的项目启动器 - 快速初始化新项目
什么是 Setup?
Section titled “什么是 Setup?”Setup 帮助快速启动新项目:
- 项目结构创建
- 依赖安装
- 基础配置
- 开发环境就绪
安装 OMC
Section titled “安装 OMC”1. 安装 OMC
Section titled “1. 安装 OMC”# 通过 npmnpm install -g oh-my-claudecode
# 或通过 Homebrewbrew install oh-my-claudecode2. 验证安装
Section titled “2. 验证安装”omc --versionomc doctor# 创建新项目omc setup new my-project
# 指定模板omc setup new my-project --template reactomc setup new my-project --template vueomc setup new my-project --template nodeomc setup new my-project --template python初始化现有项目
Section titled “初始化现有项目”# 在已有项目目录omc setup init
# 指定技能集omc setup init --skills plan,ralph,autopilot1. 项目结构
Section titled “1. 项目结构”my-project/├── .omc/│ ├── config.json│ ├── skills/│ └── state/├── src/├── tests/├── docs/└── README.md2. 配置文件
Section titled “2. 配置文件”.omc/config.json- OMC 配置.claude/settings.json- Claude 配置
3. 自动化
Section titled “3. 自动化”- Git hooks
- CI/CD 模板
OMC 配置
Section titled “OMC 配置”{ "skills": { "plan": { "enabled": true }, "ralph": { "enabled": true }, "autopilot": { "enabled": true }, "team": { "enabled": true } }, "mcp": { "enabled": true, "services": ["filesystem", "git", "bash"] }}export OMC_DEBUG=trueexport OMC_LOG_LEVEL=infoexport OMC_DATA_PATH=~/.omcomc doctor # 检查安装omc doctor --verbose # 详细诊断omc doctor --fix # 自动修复| 问题 | 解决方案 |
|---|---|
| 技能不加载 | omc setup --repair |
| MCP 连接失败 | 检查网络和配置 |
| 权限问题 | 检查文件权限 |
官方文档: setup/SKILL.md