cyrus-setup-github

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 GitHub

GitHub设置

Configures GitHub CLI and git so Cyrus can create branches, commits, and pull requests.
配置GitHub CLI和git,以便Cyrus可以创建分支、提交代码和拉取请求。

Step 1: Check Existing Configuration

步骤1:检查现有配置

Check if
gh
is already authenticated:
bash
gh auth status 2>&1
If authenticated, check git config:
bash
git config --global user.name
git config --global user.email
If both
gh
auth and git config are set, inform the user:
GitHub is already configured. Skipping this step.
Skip to completion.
检查
gh
是否已经完成身份验证:
bash
gh auth status 2>&1
如果已通过验证,请检查git配置:
bash
git config --global user.name
git config --global user.email
如果
gh
身份验证和git配置都已设置完成,请告知用户:
GitHub已完成配置,跳过此步骤。
直接跳转到完成部分。

Step 2: Authenticate GitHub CLI

步骤2:GitHub CLI身份验证

If
gh
is not authenticated:
bash
gh auth login
This opens an interactive browser flow. Let the user complete it.
After completion, verify:
bash
gh auth status
如果
gh
未完成身份验证:
bash
gh auth login
这将打开交互式浏览器流程,请用户完成相关操作。
操作完成后进行验证:
bash
gh auth status

Step 3: Configure Git Identity

步骤3:配置Git身份

If git user name or email are not set, ask the user for their preferred values:
What name should appear on commits made by Cyrus? (e.g., your name, or "Cyrus Bot")
What email should appear on commits? (e.g., your email, or a noreply address)
Then set them:
bash
git config --global user.name "<name>"
git config --global user.email "<email>"
如果git用户名或邮箱未设置,请询问用户偏好的取值:
Cyrus生成的提交上应该显示什么名称? (例如:你的姓名,或"Cyrus Bot")
提交上应该显示什么邮箱? (例如:你的邮箱,或无回复地址)
然后进行设置:
bash
git config --global user.name "<name>"
git config --global user.email "<email>"

Step 4: Verify

步骤4:验证

bash
gh auth status
git config --global user.name
git config --global user.email
bash
gh auth status
git config --global user.name
git config --global user.email

Completion

完成

✓ GitHub CLI authenticated ✓ Git identity configured:
<name>
<
email
>
✓ GitHub CLI已完成身份验证 ✓ Git身份已配置:
<name>
<
email
>