cyrus-setup-repository

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
CRITICAL: Never use
Read
,
Edit
, or
Write
tools on
~/.cyrus/.env
or any file inside
~/.cyrus/
. Use only
Bash
commands (
grep
,
printf >>
, etc.) to interact with env files — secrets must never be read into the conversation context.
重要提示:绝对不要对
~/.cyrus/.env
~/.cyrus/
目录下的任何文件使用
Read
Edit
Write
工具。仅使用
Bash
命令(
grep
printf >>
等)与环境文件交互——密钥绝对不能被读取到对话上下文中。

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 -l
If repositories are already configured, list them:
bash
cat ~/.cyrus/config.json 2>/dev/null
Inform 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
~/.cyrus/repos/
and registers it with the Linear workspace.
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>
该命令会将仓库克隆到
~/.cyrus/repos/
目录下,并将其注册到Linear工作区。
如果配置了多个工作区,询问用户要使用哪个工作区:
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:
<url>
(repeat for each added repo)
✓ 已添加仓库:
<url>
每个添加的仓库都重复展示该提示