# dev-config **Repository Path**: NetADs/dev-config ## Basic Information - **Project Name**: dev-config - **Description**: 各个环境的全局配置仓库 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-28 - **Last Updated**: 2026-05-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Dev Config — 开发环境全局配置 统一的 MonkeyCode 开发环境配置仓库,支持多种开发场景。 ## 支持的开发环境 | 环境 | 目录 | 说明 | |------|------|------| | **ESP-IDF** | [`esp-idf/`](./esp-idf/) | ESP-IDF v5.x 组件开发 | | **PlatformIO** | [`platformio/`](./platformio/) | 嵌入式多平台开发 | | Web 前端 | `web/` | React/Vue 前端开发 | | Python | `python/` | Python 项目开发 | | Node.js | `nodejs/` | Node.js 后端开发 | | Rust | `rust/` | Rust 项目开发 | | Go | `go/` | Go 项目开发 | ## 快速安装 ### Linux / macOS ```bash git clone https://gitee.com/NetADs/dev-config.git cd dev-config # 安装 ESP-IDF 环境 ./install.sh esp-idf # 安装 PlatformIO 环境 ./install.sh platformio # 安装 Web 前端环境 ./install.sh web # 安装所有环境 ./install.sh --all # 查看可用环境 ./install.sh --list ``` ### Windows (PowerShell) ```powershell # 克隆仓库 git clone https://gitee.com/NetADs/dev-config.git cd dev-config # 安装 ESP-IDF 环境 .\install.ps1 esp-idf # 安装 PlatformIO 环境 .\install.ps1 platformio # 安装所有环境 .\install.ps1 -All # 查看可用环境 .\install.ps1 -List ``` 如果提示执行策略限制,以管理员身份运行 PowerShell 后执行: ```powershell Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser ``` ## 项目配置初始化 安装全局配置后,在每个新项目中使用初始化工具: ### Linux / macOS ```bash # 在项目根目录运行 /path/to/dev-config/init-opencode.sh # 或指定项目目录 /path/to/dev-config/init-opencode.sh /path/to/my-project # 从特定模板初始化 /path/to/dev-config/init-opencode.sh --template=esp-idf . /path/to/dev-config/init-opencode.sh --template=platformio . ``` ### Windows (PowerShell) ```powershell # 在项目根目录运行 .\init-opencode.ps1 # 或指定项目目录 .\init-opencode.ps1 C:\Projects\my-project # 从特定模板初始化 .\init-opencode.ps1 -Template esp-idf . .\init-opencode.ps1 -Template platformio . ``` 初始化后,项目根目录会创建 `.opencode/` 目录,AI 助手会自动加载配置。 ## 目录结构 ``` dev-config/ ├── esp-idf/ # ESP-IDF 开发环境 │ ├── .opencode/ │ │ ├── skills/ # 技能 │ │ ├── rules/ # 规则 │ │ └── opencode.json │ ├── install.sh # Bash 安装脚本 │ ├── install.ps1 # PowerShell 安装脚本 │ └── README.md # 环境说明 ├── platformio/ # PlatformIO 开发环境 (同上) ├── web/ # Web 前端开发环境 (待添加) ├── python/ # Python 开发环境 (待添加) ├── install.sh # Bash 全局安装脚本 ├── install.ps1 # PowerShell 全局安装脚本 ├── init-opencode.sh # Bash 项目初始化工具 ├── init-opencode.ps1 # PowerShell 项目初始化工具 ├── README.md └── LICENSE ``` ## 添加新的开发环境 1. 创建环境目录:`mkdir ` 2. 添加 `.opencode/` 配置目录(skills、rules、opencode.json) 3. 创建 `install.sh` 安装脚本 4. 更新根目录 README 的环境列表 ## 自定义配置 安装后配置在 `~/.config/opencode/`,可直接编辑: ```bash # 编辑全局技能 ~/.config/opencode/skills//SKILL.md # 编辑全局规则 ~/.config/opencode/rules/.md # 编辑全局配置 ~/.config/opencode/opencode.json ``` ## 注意事项 - 安装后**无需重启** MonkeyCode,立即生效 - 配置存储在 `~/.config/opencode/` 全局目录 - 所有工作空间共享同一份配置 ## 许可证 MIT License