cyrus-setup-repository
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCRITICAL: Never use , , or tools on or any file inside . Use only commands (, , etc.) to interact with env files — secrets must never be read into the conversation context.
ReadEditWrite~/.cyrus/.env~/.cyrus/Bashgrepprintf >>重要提示:绝对不要对或目录下的任何文件使用、或工具。仅使用命令(、等)与环境文件交互——密钥绝对不能被读取到对话上下文中。
~/.cyrus/.env~/.cyrus/ReadEditWriteBashgrepprintf >>Setup Repository
配置代码仓库
Adds Git repositories to Cyrus so it knows which codebases to work with.
将Git仓库添加到Cyrus中,以便它识别需要处理的代码库。
Step 1: Check Existing Repositories
步骤1:检查现有仓库
bash
cat ~/.cyrus/config.json 2>/dev/null | grep -o '"url"' | wc -lIf repositories are already configured, list them:
bash
cat ~/.cyrus/config.json 2>/dev/nullInform the user which repos are already added.
bash
cat ~/.cyrus/config.json 2>/dev/null | grep -o '"url"' | wc -l如果已经配置了仓库,可以执行以下命令列出:
bash
cat ~/.cyrus/config.json 2>/dev/null告知用户已添加的仓库列表。
Step 2: Add a Repository
步骤2:添加仓库
Ask the user:
What is the Git URL of the repository you want Cyrus to work with? (e.g.,)https://github.com/yourorg/yourrepo.git
Run:
bash
cyrus self-add-repo <url>This clones the repo to and registers it with the Linear workspace.
~/.cyrus/repos/If multiple workspaces are configured, ask which workspace to use:
bash
cyrus self-add-repo <url> "<workspace name>"Verify the repo was added:
bash
cat ~/.cyrus/config.json | grep "<repo-name>"询问用户:
你希望Cyrus处理的仓库的Git URL是什么? 例如:https://github.com/yourorg/yourrepo.git
执行命令:
bash
cyrus self-add-repo <url>该命令会将仓库克隆到目录下,并将其注册到Linear工作区。
~/.cyrus/repos/如果配置了多个工作区,询问用户要使用哪个工作区:
bash
cyrus self-add-repo <url> "<workspace name>"验证仓库是否添加成功:
bash
cat ~/.cyrus/config.json | grep "<repo-name>"Step 3: Add More?
步骤3:是否添加更多仓库?
Ask the user:
Would you like to add another repository? (y/n)
If yes, repeat Step 2. If no, continue.
询问用户:
你需要添加另一个仓库吗?(y/n)
如果是,重复步骤2。如果否,继续后续操作。
Completion
完成提示
✓ Repository added:(repeat for each added repo)<url>
✓ 已添加仓库:每个添加的仓库都重复展示该提示<url>