> ## 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

> Understand how a GitHub repository connects your local CLI commands to an Osmosis workspace

A workspace repository is the GitHub repository connected to one Osmosis platform workspace. The platform creates it from the Osmosis workspace template or connects an existing repository, then uses Git Sync to discover rollouts and configs.

Your local workspace directory is a clone of that repository.

## How CLI Context Works

When you run platform commands from inside a workspace directory, the CLI:

1. Finds the Git worktree root.
2. Reads the `origin` remote.
3. Normalizes the GitHub repository identity as `owner/repo`.
4. Sends that identity to the platform so the request is scoped to the matching workspace.

This means commands like `osmosis dataset list`, `osmosis train submit`, `osmosis rollout list`, and `osmosis model deploy` should be run from inside the cloned workspace repository.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
git remote get-url origin
osmosis dataset list
```

<Note>
  The `origin` remote must point to a GitHub repository connected to your platform workspace. If the repository was renamed on GitHub, update your local remote before running CLI commands.
</Note>

## Common Requirements

| Requirement            | Why it matters                                                                                                         |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| Git worktree           | The CLI uses the Git root as the workspace directory.                                                                  |
| GitHub `origin` remote | The CLI maps `origin` to the platform workspace.                                                                       |
| Platform login         | Platform commands require `osmosis auth login` or `OSMOSIS_TOKEN`.                                                     |
| Required directories   | `rollouts/`, `configs/training/`, `configs/eval/`, and `data/` make the directory a valid Osmosis workspace directory. |

Run a local health check when something looks wrong:

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

Repair missing scaffold directories:

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

## Repository Ownership

Workspace creators usually create the repository from the platform during onboarding. Invited members should clone the existing workspace repository rather than creating a separate one.

Only workspace owners and admins can manage GitHub repository connection settings in the platform. Members can clone and use the repository if they have GitHub access.

## Related Commands

```bash theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
osmosis template list
osmosis template apply multiply-local-strands
osmosis rollout init my-rollout
osmosis eval submit configs/eval/my-rollout.toml
osmosis train submit configs/training/my-rollout.toml
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Structure & Configuration" icon="folder-tree" href="/cli/workspace/structure-and-config">
    Learn the repository layout and config directories.
  </Card>

  <Card title="Git Sync" icon="code-branch" href="/cli/workspace/git-sync">
    Understand how pushes become platform rollouts.
  </Card>
</CardGroup>
