workspace-manager
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWorkspace Manager
工作区管理器
Manage workspaces stored in . Each workspace represents a logical development context (e.g., "personal", "work", "client-acme").
~/.brn/config.yaml管理存储在中的工作区。每个工作区代表一个逻辑开发环境(例如:"personal"、"work"、"client-acme")。
~/.brn/config.yamlQuick Reference
快速参考
| Action | Script |
|---|---|
| Create workspace | |
| List workspaces | |
| Show active | |
| Switch workspace | |
| Configure workspace | |
| 操作 | 脚本 |
|---|---|
| 创建工作区 | |
| 列出工作区 | |
| 查看活跃工作区 | |
| 切换工作区 | |
| 配置工作区 | |
Config Structure
配置结构
Global: ~/.brn/config.yaml
~/.brn/config.yaml全局配置: ~/.brn/config.yaml
~/.brn/config.yamlyaml
version: "1.0"
active_workspace: personal
workspaces:
personal:
path: ~/dev/personal/auto
github_token: ghp_xxxx
jira_token: null
jira_url: null
jira_email: null
# Automation settings (all default to false for safety)
automation:
github_auto_push: false # Auto-push commits
github_auto_pr: false # Auto-create PRs
jira_auto_transition: false # Auto-update ticket status
jira_auto_comment: false # Auto-add comments
work:
path: ~/dev/work/auto
github_token: ghp_yyyy
jira_token: jira_xxxx
jira_url: https://company.atlassian.net
jira_email: you@company.com
automation:
github_auto_push: true # Work flow might be more automated
github_auto_pr: false
jira_auto_transition: true
jira_auto_comment: trueyaml
version: "1.0"
active_workspace: personal
workspaces:
personal:
path: ~/dev/personal/auto
github_token: ghp_xxxx
jira_token: null
jira_url: null
jira_email: null
# 自动化设置(默认均为false以保障安全)
automation:
github_auto_push: false # 自动推送提交
github_auto_pr: false # 自动创建PR
jira_auto_transition: false # 自动更新工单状态
jira_auto_comment: false # 自动添加评论
work:
path: ~/dev/work/auto
github_token: ghp_yyyy
jira_token: jira_xxxx
jira_url: https://company.atlassian.net
jira_email: you@company.com
automation:
github_auto_push: true # 工作流程可更自动化
github_auto_pr: false
jira_auto_transition: true
jira_auto_comment: trueWorkflow Examples
工作流示例
Create a new workspace
创建新工作区
bash
undefinedbash
undefinedCreate workspace with work directory
创建带工作目录的工作区
./scripts/create_workspace.sh personal ~/dev/personal/auto
./scripts/create_workspace.sh personal ~/dev/personal/auto
Configure GitHub token
配置GitHub令牌
./scripts/configure_workspace.sh personal github_token ghp_xxxxx
undefined./scripts/configure_workspace.sh personal github_token ghp_xxxxx
undefinedSwitch context
切换环境
bash
undefinedbash
undefinedSee what's available
查看可用工作区
./scripts/list_workspaces.sh
./scripts/list_workspaces.sh
Switch to work context
切换到工作环境
./scripts/switch_workspace.sh work
undefined./scripts/switch_workspace.sh work
undefinedIntegration
集成
Other brn skills should call to determine which config context to use for API tokens and work directories.
get_active_workspace.sh其他brn技能应调用来确定API令牌和工作目录应使用哪个配置环境。
get_active_workspace.sh