Skip to content

团队配置同步 开发中 ​

团队同步

共享配置,私有凭证

让整个团队共享同一套 AI CLI 与 MCP 配置,但敏感凭证各自独立,永不入 Git。

模式总览 ​

配置分发模型
graph LR; G[Team Git: 非敏感配置] --> S[Switch: 本地 UI]; V[Vault / OS Keyring: 敏感凭证] --> S; S --> G; S --> V
Git 仓库

签入配置骨架:server 列表、tool 定义、预设 Prompt。

Vault / OS Keyring

存 API Key、GitHub Token 等敏感项,永远不入 Git。

Git 同步 ​

  1. 首次绑定团队配置仓库:

    bash
    lurus-switch team init git@github.com:your-org/ai-config.git
  2. 日常拉取与推送:

    bash
    lurus-switch team pull
    lurus-switch team push

    team pull 会拉取团队共享的:

    • mcp.yaml(MCP Server 列表)
    • cli-configs/*.yaml(5 款 CLI 的可分享部分)
    • prompts/(Prompt 模板)

Vault 桥接 ​

yaml
# ~/.lurus-switch/vault.yaml
provider: hashicorp-vault
address: https://vault.internal.example.com
auth:
  method: token
  token_env: VAULT_TOKEN

在 mcp.yaml 引用:

yaml
servers:
  github:
    env:
      GITHUB_TOKEN: vault://secret/ai/github#token

明文永不落盘

Switch 在启动 MCP Server 时动态从 Vault 取值,凭证明文永不落盘。

支持的 Provider:

HashiCorp Vault

集中式密钥管理服务

macOS Keychain

系统级凭证存储

Windows Credential Manager

系统级凭证存储

Linux Secret Service

libsecret 后端

Diff 审计 ​

bash
lurus-switch team diff

显示本地与团队远端的配置差异(不含敏感项)。

回滚 ​

bash
lurus-switch team rollback <commit-sha>

本地配置回到 Git 任意历史版本。

下一步 ​

下一步

Powered by Lurus Technologies