-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
Add Trae IDE support (.trae/) #985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,184 @@ | ||
| # Everything Claude Code for Trae | ||
|
|
||
| Bring Everything Claude Code (ECC) workflows to Trae IDE. This repository provides custom commands, agents, skills, and rules that can be installed into any Trae project with a single command. | ||
|
|
||
| ## Quick Start | ||
|
|
||
| ### Option 1: Local Installation (Current Project Only) | ||
|
|
||
| ```bash | ||
| # Install to current project | ||
| cd /path/to/your/project | ||
| TRAE_ENV=cn .trae/install.sh | ||
| ``` | ||
|
|
||
| This creates `.trae-cn/` in your project directory. | ||
|
|
||
| ### Option 2: Global Installation (All Projects) | ||
|
|
||
| ```bash | ||
| # Install globally to ~/.trae-cn/ | ||
| cd /path/to/your/project | ||
| TRAE_ENV=cn .trae/install.sh ~ | ||
|
|
||
| # Or from the .trae folder directly | ||
| cd /path/to/your/project/.trae | ||
| TRAE_ENV=cn ./install.sh ~ | ||
| ``` | ||
|
|
||
| This creates `~/.trae-cn/` which applies to all Trae projects. | ||
|
|
||
| ### Option 3: Quick Install to Current Directory | ||
|
|
||
| ```bash | ||
| # If already in project directory with .trae folder | ||
| cd .trae | ||
| ./install.sh | ||
| ``` | ||
|
|
||
| The installer uses non-destructive copy - it will not overwrite your existing files. | ||
|
|
||
| ## Installation Modes | ||
|
|
||
| ### Local Installation | ||
|
|
||
| Install to the current project's `.trae-cn` directory: | ||
|
|
||
| ```bash | ||
| cd /path/to/your/project | ||
| TRAE_ENV=cn .trae/install.sh | ||
| ``` | ||
|
|
||
| This creates `/path/to/your/project/.trae-cn/` with all ECC components. | ||
|
|
||
| ### Global Installation | ||
|
|
||
| Install to your home directory's `.trae-cn` directory (applies to all Trae projects): | ||
|
|
||
| ```bash | ||
| # From project directory | ||
| TRAE_ENV=cn .trae/install.sh ~ | ||
|
|
||
| # Or directly from .trae folder | ||
| cd .trae | ||
| TRAE_ENV=cn ./install.sh ~ | ||
| ``` | ||
|
|
||
| This creates `~/.trae-cn/` with all ECC components. All Trae projects will use these global installations. | ||
|
|
||
| **Note**: Global installation is useful when you want to maintain a single copy of ECC across all your projects. | ||
|
|
||
| ## Environment Support | ||
|
|
||
| - **Default**: Uses `.trae` directory | ||
| - **CN Environment**: Uses `.trae-cn` directory (set via `TRAE_ENV=cn`) | ||
|
|
||
| ### Force Environment | ||
|
|
||
| ```bash | ||
| # From project root, force the CN environment | ||
| TRAE_ENV=cn .trae/install.sh | ||
|
|
||
| # From inside the .trae folder | ||
| cd .trae | ||
| TRAE_ENV=cn ./install.sh | ||
| ``` | ||
|
|
||
| **Note**: `TRAE_ENV` is a global environment variable that applies to the entire installation session. | ||
|
|
||
| ## Uninstall | ||
|
|
||
| The uninstaller uses a manifest file (`.ecc-manifest`) to track installed files, ensuring safe removal: | ||
|
|
||
| ```bash | ||
| # Uninstall from current directory (if already inside .trae or .trae-cn) | ||
| cd .trae-cn | ||
| ./uninstall.sh | ||
|
|
||
| # Or uninstall from project root | ||
| cd /path/to/your/project | ||
| TRAE_ENV=cn .trae/uninstall.sh | ||
|
|
||
| # Uninstall globally from home directory | ||
| TRAE_ENV=cn .trae/uninstall.sh ~ | ||
|
|
||
| # Will ask for confirmation before uninstalling | ||
| ``` | ||
|
|
||
| ### Uninstall Behavior | ||
|
|
||
| - **Safe removal**: Only removes files tracked in the manifest (installed by ECC) | ||
| - **User files preserved**: Any files you added manually are kept | ||
| - **Non-empty directories**: Directories containing user-added files are skipped | ||
| - **Manifest-based**: Requires `.ecc-manifest` file (created during install) | ||
|
|
||
| ### Environment Support | ||
|
|
||
| Uninstall respects the same `TRAE_ENV` environment variable as install: | ||
|
|
||
| ```bash | ||
| # Uninstall from .trae-cn (CN environment) | ||
| TRAE_ENV=cn ./uninstall.sh | ||
|
|
||
| # Uninstall from .trae (default environment) | ||
| ./uninstall.sh | ||
| ``` | ||
|
|
||
| **Note**: If no manifest file is found (old installation), the uninstaller will ask whether to remove the entire directory. | ||
|
|
||
| ## What's Included | ||
|
|
||
| ### Commands | ||
|
|
||
| Commands are on-demand workflows invocable via the `/` menu in Trae chat. All commands are reused directly from the project root's `commands/` folder. | ||
|
|
||
| ### Agents | ||
|
|
||
| Agents are specialized AI assistants with specific tool configurations. All agents are reused directly from the project root's `agents/` folder. | ||
|
|
||
| ### Skills | ||
|
|
||
| Skills are on-demand workflows invocable via the `/` menu in chat. All skills are reused directly from the project's `skills/` folder. | ||
|
|
||
| ### Rules | ||
|
|
||
| Rules provide always-on rules and context that shape how the agent works with your code. All rules are reused directly from the project root's `rules/` folder. | ||
|
|
||
| ## Usage | ||
|
|
||
| 1. Type `/` in chat to open the commands menu | ||
| 2. Select a command or skill | ||
| 3. The agent will guide you through the workflow with specific instructions and checklists | ||
|
|
||
| ## Project Structure | ||
|
|
||
| ``` | ||
| .trae/ (or .trae-cn/) | ||
| ├── commands/ # Command files (reused from project root) | ||
| ├── agents/ # Agent files (reused from project root) | ||
| ├── skills/ # Skill files (reused from skills/) | ||
| ├── rules/ # Rule files (reused from project root) | ||
| ├── install.sh # Install script | ||
| ├── uninstall.sh # Uninstall script | ||
| └── README.md # This file | ||
| ``` | ||
|
|
||
| ## Customization | ||
|
|
||
| All files are yours to modify after installation. The installer never overwrites existing files, so your customizations are safe across re-installs. | ||
|
|
||
| **Note**: The `install.sh` and `uninstall.sh` scripts are automatically copied to the target directory during installation, so you can run these commands directly from your project. | ||
|
|
||
| ## Recommended Workflow | ||
|
|
||
| 1. **Start with planning**: Use `/plan` command to break down complex features | ||
| 2. **Write tests first**: Invoke `/tdd` command before implementing | ||
| 3. **Review your code**: Use `/code-review` after writing code | ||
| 4. **Check security**: Use `/code-review` again for auth, API endpoints, or sensitive data handling | ||
| 5. **Fix build errors**: Use `/build-fix` if there are build errors | ||
|
|
||
| ## Next Steps | ||
|
|
||
| - Open your project in Trae | ||
| - Type `/` to see available commands | ||
| - Enjoy the ECC workflows! | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,192 @@ | ||
| # Everything Claude Code for Trae | ||
|
|
||
| 为 Trae IDE 带来 Everything Claude Code (ECC) 工作流。此仓库提供自定义命令、智能体、技能和规则,可以通过单个命令安装到任何 Trae 项目中。 | ||
|
|
||
| ## 快速开始 | ||
|
|
||
| ### 方式一:本地安装到 `.trae` 目录(默认环境) | ||
|
|
||
| ```bash | ||
| # 安装到当前项目的 .trae 目录 | ||
| cd /path/to/your/project | ||
| .trae/install.sh | ||
| ``` | ||
|
|
||
| 这将在您的项目目录中创建 `.trae/`。 | ||
|
|
||
| ### 方式二:本地安装到 `.trae-cn` 目录(CN 环境) | ||
|
|
||
| ```bash | ||
| # 安装到当前项目的 .trae-cn 目录 | ||
| cd /path/to/your/project | ||
| TRAE_ENV=cn .trae/install.sh | ||
| ``` | ||
|
|
||
| 这将在您的项目目录中创建 `.trae-cn/`。 | ||
|
|
||
| ### 方式三:全局安装到 `~/.trae` 目录(默认环境) | ||
|
|
||
| ```bash | ||
| # 全局安装到 ~/.trae/ | ||
| cd /path/to/your/project | ||
| .trae/install.sh ~ | ||
| ``` | ||
|
|
||
| 这将创建 `~/.trae/`,适用于所有 Trae 项目。 | ||
|
|
||
| ### 方式四:全局安装到 `~/.trae-cn` 目录(CN 环境) | ||
|
|
||
| ```bash | ||
| # 全局安装到 ~/.trae-cn/ | ||
| cd /path/to/your/project | ||
| TRAE_ENV=cn .trae/install.sh ~ | ||
| ``` | ||
|
|
||
| 这将创建 `~/.trae-cn/`,适用于所有 Trae 项目。 | ||
|
|
||
| 安装程序使用非破坏性复制 - 它不会覆盖您现有的文件。 | ||
|
|
||
| ## 安装模式 | ||
|
|
||
| ### 本地安装 | ||
|
|
||
| 安装到当前项目的 `.trae` 或 `.trae-cn` 目录: | ||
|
|
||
| ```bash | ||
| # 安装到当前项目的 .trae 目录(默认) | ||
| cd /path/to/your/project | ||
| .trae/install.sh | ||
|
|
||
| # 安装到当前项目的 .trae-cn 目录(CN 环境) | ||
| cd /path/to/your/project | ||
| TRAE_ENV=cn .trae/install.sh | ||
| ``` | ||
|
|
||
| ### 全局安装 | ||
|
|
||
| 安装到您主目录的 `.trae` 或 `.trae-cn` 目录(适用于所有 Trae 项目): | ||
|
|
||
| ```bash | ||
| # 全局安装到 ~/.trae/(默认) | ||
| .trae/install.sh ~ | ||
|
|
||
| # 全局安装到 ~/.trae-cn/(CN 环境) | ||
| TRAE_ENV=cn .trae/install.sh ~ | ||
| ``` | ||
|
|
||
| **注意**:全局安装适用于希望在所有项目之间维护单个 ECC 副本的场景。 | ||
|
|
||
| ## 环境支持 | ||
|
|
||
| - **默认**:使用 `.trae` 目录 | ||
| - **CN 环境**:使用 `.trae-cn` 目录(通过 `TRAE_ENV=cn` 设置) | ||
|
|
||
| ### 强制指定环境 | ||
|
|
||
| ```bash | ||
| # 从项目根目录强制使用 CN 环境 | ||
| TRAE_ENV=cn .trae/install.sh | ||
|
|
||
| # 进入 .trae 目录后使用默认环境 | ||
| cd .trae | ||
| ./install.sh | ||
| ``` | ||
|
|
||
| **注意**:`TRAE_ENV` 是一个全局环境变量,适用于整个安装会话。 | ||
|
|
||
| ## 卸载 | ||
|
|
||
| 卸载程序使用清单文件(`.ecc-manifest`)跟踪已安装的文件,确保安全删除: | ||
|
|
||
| ```bash | ||
| # 从当前目录卸载(如果已经在 .trae 或 .trae-cn 目录中) | ||
| cd .trae-cn | ||
| ./uninstall.sh | ||
|
|
||
| # 或者从项目根目录卸载 | ||
| cd /path/to/your/project | ||
| TRAE_ENV=cn .trae/uninstall.sh | ||
|
|
||
| # 从主目录全局卸载 | ||
| TRAE_ENV=cn .trae/uninstall.sh ~ | ||
|
|
||
| # 卸载前会询问确认 | ||
| ``` | ||
|
|
||
| ### 卸载行为 | ||
|
|
||
| - **安全删除**:仅删除清单中跟踪的文件(由 ECC 安装的文件) | ||
| - **保留用户文件**:您手动添加的任何文件都会被保留 | ||
| - **非空目录**:包含用户添加文件的目录会被跳过 | ||
| - **基于清单**:需要 `.ecc-manifest` 文件(在安装时创建) | ||
|
|
||
| ### 环境支持 | ||
|
|
||
| 卸载程序遵循与安装程序相同的 `TRAE_ENV` 环境变量: | ||
|
|
||
| ```bash | ||
| # 从 .trae-cn 卸载(CN 环境) | ||
| TRAE_ENV=cn ./uninstall.sh | ||
|
|
||
| # 从 .trae 卸载(默认环境) | ||
| ./uninstall.sh | ||
| ``` | ||
|
|
||
| **注意**:如果找不到清单文件(旧版本安装),卸载程序将询问是否删除整个目录。 | ||
|
|
||
| ## 包含的内容 | ||
|
|
||
| ### 命令 | ||
|
|
||
| 命令是通过 Trae 聊天中的 `/` 菜单调用的按需工作流。所有命令都直接复用自项目根目录的 `commands/` 文件夹。 | ||
|
|
||
| ### 智能体 | ||
|
|
||
| 智能体是具有特定工具配置的专门 AI 助手。所有智能体都直接复用自项目根目录的 `agents/` 文件夹。 | ||
|
|
||
| ### 技能 | ||
|
|
||
| 技能是通过聊天中的 `/` 菜单调用的按需工作流。所有技能都直接复用自项目的 `skills/` 文件夹。 | ||
|
|
||
| ### 规则 | ||
|
|
||
| 规则提供始终适用的规则和上下文,塑造智能体处理代码的方式。所有规则都直接复用自项目根目录的 `rules/` 文件夹。 | ||
|
|
||
| ## 使用方法 | ||
|
|
||
| 1. 在聊天中输入 `/` 以打开命令菜单 | ||
| 2. 选择一个命令或技能 | ||
| 3. 智能体将通过具体说明和检查清单指导您完成工作流 | ||
|
|
||
| ## 项目结构 | ||
|
|
||
| ``` | ||
| .trae/ (或 .trae-cn/) | ||
| ├── commands/ # 命令文件(复用自项目根目录) | ||
| ├── agents/ # 智能体文件(复用自项目根目录) | ||
| ├── skills/ # 技能文件(复用自 skills/) | ||
| ├── rules/ # 规则文件(复用自项目根目录) | ||
| ├── install.sh # 安装脚本 | ||
| ├── uninstall.sh # 卸载脚本 | ||
| └── README.md # 此文件 | ||
| ``` | ||
|
|
||
| ## 自定义 | ||
|
|
||
| 安装后,所有文件都归您修改。安装程序永远不会覆盖现有文件,因此您的自定义在重新安装时是安全的。 | ||
|
|
||
| **注意**:安装时会自动将 `install.sh` 和 `uninstall.sh` 脚本复制到目标目录,这样您可以在项目本地直接运行这些命令。 | ||
|
|
||
| ## 推荐的工作流 | ||
|
|
||
| 1. **从计划开始**:使用 `/plan` 命令分解复杂功能 | ||
| 2. **先写测试**:在实现之前调用 `/tdd` 命令 | ||
| 3. **审查您的代码**:编写代码后使用 `/code-review` | ||
| 4. **检查安全性**:对于身份验证、API 端点或敏感数据处理,再次使用 `/code-review` | ||
| 5. **修复构建错误**:如果有构建错误,使用 `/build-fix` | ||
|
|
||
| ## 下一步 | ||
|
|
||
| - 在 Trae 中打开您的项目 | ||
| - 输入 `/` 以查看可用命令 | ||
| - 享受 ECC 工作流! |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Option 1: Local Installation" immediately jumps to
TRAE_ENV=cn .trae/install.sh, which installs into.trae-cn/. The default (non-CN) local install has no Quick Start example in the English README.The Chinese README (
README.zh-CN.md) correctly documents all four cases as 方式一–方式四. The English README should mirror that structure:This creates
.trae/in your project directory.Option 2: Local Installation (CN Environment)
cd /path/to/your/project TRAE_ENV=cn .trae/install.shThis creates
.trae-cn/in your project directory.