> ## Documentation Index
> Fetch the complete documentation index at: https://docs.osmosis.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 入门引导

> 设置 workspace repository 并选择第一个训练工作流

在运行 quickstart 或构建自定义 rollout 之前，请先完成一次 onboarding。完成后，您应该拥有一个平台 workspace、一个已连接的 GitHub 仓库、一个本地 clone，以及一个已认证的 CLI session。

Osmosis 设置从 [Platform](https://platform.osmosis.ai) 开始。平台会在 GitHub 上创建或提供一个 **workspace repository**，您的本地 **workspace directory** 就是该仓库的 clone。

## 通用设置

在使用 [运行 Multiply 示例](/zh/platform/quickstart) 或 [创建自己的 Rollout](/zh/platform/create-your-own-rollout) 之前，请先完成这些步骤。

<Steps>
  <Step title="创建或加入平台 workspace">
    如果您正在创建新的 workspace，请登录平台并在那里创建。如果您是被邀请加入，请接受邀请并打开已有 workspace。
  </Step>

  <Step title="设置 workspace repository">
    workspace owners 或 admins 需要连接 GitHub 账号或组织，安装 Osmosis GitHub App，并从平台创建 workspace repository。

    从平台创建的仓库会包含 starter examples：`multiply-local-strands`、`multiply-local-openai` 和 `multiply-harbor-strands`。

    被邀请的 workspace 成员使用已经存在的 workspace repository。不要为同一个 workspace 创建第二个仓库。
  </Step>

  <Step title="Clone workspace repository">
    仓库连接后，平台会显示 clone 命令。选择 HTTPS、SSH 或 GitHub CLI：

    <CodeGroup>
      ```cli HTTPS theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
      git clone https://github.com/<owner>/<repo>.git
      cd <repo>
      ```

      ```cli SSH theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
      git clone git@github.com:<owner>/<repo>.git
      cd <repo>
      ```

      ```cli GitHub CLI theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
      gh repo clone <owner>/<repo>
      cd <repo>
      ```
    </CodeGroup>
  </Step>

  <Step title="安装并认证 CLI">
    安装 Osmosis CLI，并连接到您的账号：

    <CodeGroup>
      ```bash pip theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
      pip install osmosis-ai
      ```

      ```bash pipx theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
      pipx install osmosis-ai
      ```

      ```bash uv tool theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
      uv tool install osmosis-ai
      ```
    </CodeGroup>

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
    osmosis auth login
    ```

    请在 workspace directory 内运行平台命令。CLI 会读取 GitHub `origin` 来识别该仓库连接的平台 workspace。
  </Step>

  <Step title="验证本地 workspace context">
    在已 clone 的 workspace directory 中，确认 CLI 可以解析您的 workspace：

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
    osmosis doctor
    osmosis auth whoami
    ```
  </Step>
</Steps>

## 选择您的第一个工作流

<CardGroup cols={2}>
  <Card title="RL 新用户" icon="rocket" href="/zh/platform/quickstart">
    使用可复制粘贴的命令，端到端运行内置的 `multiply-local-openai` example。
  </Card>

  <Card title="已有任务或数据集" icon="wand-magic-sparkles" href="/zh/platform/create-your-own-rollout">
    使用 workspace 中的 project-local Agent Skills 来规划训练、创建 rollout，并在本地验证。
  </Card>
</CardGroup>

## Workspace Repository 与 Directory

| 术语                       | 含义                                                                                       |
| ------------------------ | ---------------------------------------------------------------------------------------- |
| **Workspace repository** | 连接到平台 workspace 的 GitHub 仓库。平台会创建或连接它，并将其作为 rollout 代码来源。                                |
| **Workspace directory**  | workspace repository 的本地 clone。请在这里运行 CLI 命令，让 Osmosis 可以从 Git `origin` 推断连接的 workspace。 |

## 如果设置被阻塞

当 workspace 缺少必要的仓库设置时，平台可能会显示 GitHub banner。

| 状态             | 处理方式                                                         |
| -------------- | ------------------------------------------------------------ |
| 未连接 GitHub 账号  | workspace owners 或 admins 应在 **Git Integration** 中连接 GitHub。 |
| 未连接仓库          | workspace owners 或 admins 应创建或连接 workspace repository。       |
| GitHub App 已断开 | 提交训练前重新连接 GitHub App。                                        |
| 仓库需要设置         | 打开 **Git Integration** 并按照仓库修复流程操作。                          |

<Note>
  如需了解 Git Sync 如何控制训练使用的代码版本，请参见 [Git Sync](/zh/cli/workspace/git-sync)。
</Note>

## 下一步

<CardGroup cols={2}>
  <Card title="运行 Multiply 示例" icon="rocket" href="/zh/platform/quickstart">
    复制粘贴从已 clone 仓库到训练的最短路径。
  </Card>

  <Card title="创建自己的 Rollout" icon="wand-magic-sparkles" href="/zh/platform/create-your-own-rollout">
    使用 project-local Agent Skills 和 evaluation run gates 构建 task-specific rollout。
  </Card>

  <Card title="Workspace Repository" icon="code-branch" href="/zh/cli/workspace/repository">
    了解 CLI 如何将您的 Git clone 映射到平台 workspace。
  </Card>
</CardGroup>
