tb-init
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTeamBition 工作区初始化
TeamBition Workspace Initialization
执行步骤
Execution Steps
步骤 1:检查现有配置
Step 1: Check Existing Configuration
读取当前目录是否已有 :
.teambition.md- 已存在:展示当前配置摘要,让用户明确选择"重新配置 / 仅更新部分 / 取消"
- 不存在:从头开始配置
规则:
- 如果宿主支持交互选择控件,则使用交互选择
- 如果宿主不支持交互选择控件,则直接在对话中逐项询问用户
- 不要自动从 、其他配置文件或已有 MCP 连接中偷用凭证,除非用户明确要求“导入现有配置”
.mcp.json - 不要自动替用户选择常用项目;必须先展示候选项,再等待用户确认
Read whether there is already in the current directory:
.teambition.md- Exists: Display the summary of current configuration, let the user explicitly choose "Reconfigure / Update only part / Cancel"
- Does not exist: Configure from scratch
Rules:
- If the host supports interactive selection controls, use interactive selection
- If the host does not support interactive selection controls, directly ask the user item by item in the conversation
- Do not automatically steal credentials from , other configuration files or existing MCP connections unless the user explicitly requests "import existing configuration"
.mcp.json - Do not automatically select common projects for users; you must first display the candidates, then wait for user confirmation
步骤 2:配置凭证
Step 2: Configure Credentials
逐项收集(如果已有则展示当前值供确认):
- App ID — 从 https://open.teambition.com → 应用管理获取
- App Secret — 同上
- Operator ID — 操作者用户 ID
- Organization ID — 组织 ID
Collect item by item (if already exists, display the current value for confirmation):
- App ID — Obtained from https://open.teambition.com → Application Management
- App Secret — Same as above
- Operator ID — Operator user ID
- Organization ID — Organization ID
步骤 3:配置参数
Step 3: Configure Parameters
收集:
- 最大常用项目数 — 默认 5,范围 1-10
- 最近任务记录数 — 默认 10,范围 5-20
Collect:
- Maximum number of common projects — Default 5, range 1-10
- Number of recent task records — Default 10, range 5-20
步骤 4:选择常用项目
Step 4: Select Common Projects
先将凭证写入 (至少包含凭证表格),然后执行:
.teambition.mdbash
node scripts/tb-api.mjs get-projects解析 JSON 结果,只展示 Active 项目,先展示候选列表,再等待用户明确选择。
First write the credentials to (contains at least the credentials table), then execute:
.teambition.mdbash
node scripts/tb-api.mjs get-projectsParse the JSON result, only display Active projects, first show the candidate list, then wait for the user's explicit selection.
步骤 5:生成 .teambition.md
Step 5: Generate .teambition.md
写入完整配置文件,格式:凭证表格 + 配置表格 + 常用项目表格 + 空的最近任务表格。
Write the complete configuration file, format: Credentials table + Configuration table + Common projects table + Empty recent tasks table.
步骤 6:确认完成
Step 6: Confirm Completion
展示配置摘要。
Display configuration summary.