---
title: Clone the workspace
description: Turn a folder into a workspace root shaped like the agent sandbox, with every repo cloned beside the base.
cli_command: wiblo repos clone
canonical_url: https://wiblo.app/docs/developers/cli/repos/repos-clone
last_updated: 2026-09-16T23:10:24+02:00
md_url: https://wiblo.app/docs/developers/cli/repos/repos-clone.md
---

# Clone the workspace

`$ wiblo repos clone`

## Usage

```bash
mkdir driftwood-physio && cd driftwood-physio
wiblo repos clone
wiblo repos clone --into driftwood-physio
wiblo repos clone --only "Main site"
```

```text
$ wiblo repos clone
> Cloning Base into base/ ...
> Cloning Main site into main-site/ ...
> Cloning Scripts into scripts/ ...
> /home/ava/driftwood-physio
>   base/  Base  cloned
>   main-site/  Main site  cloned
>   scripts/  Scripts  cloned
>   CLAUDE.md -> base/CLAUDE.md
>   AGENTS.md -> base/AGENTS.md
>   .claude -> base/.claude
>   .agents -> base/.agents
```

## What the folder looks like

```text
driftwood-physio/               the workspace root: a plain folder, never a git repo
  .wiblo/workspace.json         the marker: workspace, layout version, repos
  CLAUDE.md -> base/CLAUDE.md   links into the base, so tools at the root read its instructions
  AGENTS.md -> base/AGENTS.md
  .claude   -> base/.claude
  .agents   -> base/.agents
  base/                         the base repo
  main-site/                    one folder per repo, named from its display name
  scripts/
```

This is the same layout an agent sees inside its sandbox. Work inside `base/` and the repo folders with plain `git`. The root itself is never a repository.

## Flags

<table>
  <thead>
    <tr><th>Flag</th><th>Description</th></tr>
  </thead>
  <tbody>
    <tr><td><code>--into</code></td><td>The folder to fill, created when missing. Defaults to the current folder.</td></tr>
    <tr><td><code>--only</code></td><td>Clone this repo (by display name) in addition to the base. Repeatable. <code>--only Base</code> alone means the base only.</td></tr>
    <tr><td><code>--workspace</code></td><td>Workspace slug or id. Defaults to <code>WIBLO_WORKSPACE</code>, then the active workspace.</td></tr>
    <tr><td><code>--json</code></td><td>Print the envelope: <code>workspace_cloned</code> with <code>root</code>, <code>cloned[]</code>, <code>skipped[]</code>, and <code>links[]</code>.</td></tr>
  </tbody>
</table>

## Behaviour

- Run it again in the same root to converge: existing folders are kept as they are, new repos are cloned, and the links are rewritten. This is how one more repo joins an existing root.
- A folder with other content and no `.wiblo/workspace.json` answers `clone_root_not_empty`; pass `--into` to pick a new folder. A folder that git considers inside a repository answers `clone_root_inside_repo`.
- Each checkout is wired for the credential helper that ships with the CLI, so `git push` authenticates through your Wiblo login. Nothing secret is written to disk.
- If git cannot find that helper, the command stops before it clones anything and answers `helper_not_installed`. The helper installs with the CLI, so reinstall the CLI and run the command again. `git credential-wiblo erase` exits 0 once git can find it.
- On Windows, directory links are junctions and need no privilege. File links need Developer Mode or an elevated shell; the command says so when it cannot make one.
