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

# Repositories

> Host repositories on Entire's Git network and push and pull from a region close to you.

## What Is a Repository on Entire?

A repository that is hosted on Entire lives on Entire's Git network with no GitHub origin, so you can push and pull through a region close to where you work: the US, the EU, the UK, India, Australia, or Brazil. It has a primary region and can have regional mirrors in other Entire regions.

> [!NOTE]
>
> There are two kinds of mirrors:
>
> * **GitHub repository mirrors** are copies of a GitHub repository hosted on Entire. GitHub stays the origin while Entire serves clones and pulls, but forwards pushes to GitHub, so pushes depend on GitHub's speed and availability. See [Mirrors](https://docs.entire.com/guides/repositories/mirrors.md).
> * **Regional mirrors of a repository hosted on Entire** are copies hosted in regions of your choice within Entire's Git network. They serve clones and pulls locally and forward pushes to the repository's primary region on Entire. Both reads and writes stay within Entire, with no GitHub origin involved.
>
> This guide covers is about repositories hosted on Entire and their regional mirrors.

## How Are Repositories Hosted on Entire Helpful?

Repositories help you:

* Keep working when GitHub is down. Since your code lives on Entire, your agents can clone, pull, and push without GitHub.
* Have faster read access for your agents. Since agents pull and push a lot more than humans, repositories make the development lifecycle faster by being geographically close to you and your agents.
* Work from a single remote. You can push to and pull from the same Entire remote. If you use a regional mirror of your repository that is hosted on Entire, it serves reads locally and forwards pushes to the primary region within Entire.

## Create a Repository

You can create a repository from the CLI, on entire.com, or by asking your coding agent to do it.

**CLI**

Before you start, [install the Entire CLI](https://docs.entire.com/installation.md) and log in with `entire login`.

### 1. Create a Project

A project holds your repositories. Choose an available project name and specify its owner. This example uses `readme`; replace it with your project name throughout the commands and replace `nodo` with your organization's name:

```bash theme={null}
entire project create readme --owner nodo
```

Example output:

```text theme={null}
✓ Created project readme (01M31ZJJJ1SGSFQNK3VQKZFJNG)
```

If you already have a project, use its name in the next step. See the [project command reference](https://docs.entire.com/cli-reference/project.md) for other ownership options.

### 2. Create a Repository

Create a repository named `documentation` in your project:

```bash theme={null}
entire repo create documentation --project readme
```

Example output:

```text theme={null}
✓ Waiting for repository documentation to become active
✓ Created repository documentation (01M31ZQKMDEPMSG40Y4M9J0SG3)
  Last observed state: active
  Remote: entire://aws-us-east-2.entire.io/et/readme/documentation
```

By default, Entire creates the repository in the project's region. In this example, the primary region is `aws-us-east-2`.

### 3. Check the Repository's Regions

Inspect the repository to see its regions, clone URLs, and status:

```bash theme={null}
entire repo view /et/readme/documentation
```

Example output:

```text theme={null}
Name:
  /et/readme/documentation
Visibility:
  Private

CLUSTER                  ROLE     CLONE URL                                               STATUS
aws-us-east-2.entire.io  primary  entire://aws-us-east-2.entire.io/et/readme/documentation  ready
```

At this point, the repository is available in one region, marked `primary`. You can clone, pull, and push without adding a mirror.

### 4. Add a Mirror in Another Region (Optional)

You can add a mirror of your repository to serve clones and pulls from another region within Entire's Git network.

For this example, if you select `eu-central`, this is how you add a mirror of the repository that is hosted on Entire in another region:

```bash theme={null}
entire repo mirror add /et/readme/documentation
```

A regional mirror of a repository hosted on Entire goes in a region other than its primary region, so only those regions are offered. On a terminal Entire shows them as a multi-select, without one, name the region yourself, because `--cluster` has no default for a repistory:

```bash theme={null}
entire repo mirror add /et/readme/documentation --cluster aws-eu-central-1.entire.io
```

Example output:

```text theme={null}
readme/documentation @ aws-eu-central-1.entire.io  ✓ ready

REPO                   REGION                 STATUS  CLONE URL
/et/readme/documentation  aws-eu-central-1 (eu)  ready  entire://aws-eu-central-1.entire.io/et/readme/documentation

Clone them:
  git clone entire://aws-eu-central-1.entire.io/et/readme/documentation
```

The repository now spans two Entire regions: a primary in `aws-us-east-2` and a regional mirror in `aws-eu-central-1`. Clones and pulls from the regional mirror are served in `aws-eu-central-1`, pushes through it are forwarded to `aws-us-east-2`.

**entire.com**

To create a repository from entire.com, follow these steps:

1. Open [entire.com](https://entire.com) and sign in.
2. Open an [existing project or create a new project](https://docs.entire.com/guides/configuration/projects.md) and choose its primary region.
3. Create a repository within the project and give it a name.
4. Once the repository is ready, Entire opens its page. Use the CLI command to clone it, or copy the prompt and give it to your coding agent.

[Create a Repository on entire.com](https://customer-0x5hsk8lh27fm00g.cloudflarestream.com/9b73ec794491e34480a5599e8204599f/iframe)

**Agent Prompt**

Paste this prompt into Claude, Codex, or another coding agent with terminal access:

```text theme={null}
Create a new repository hosted on Entire for me using the Entire CLI.

Ask me for the repository name and which Entire project to use. If I
need a new project, ask for its name and owner.

Check that the Entire CLI is installed and that I'm logged in. If either
step is incomplete, help me finish it before continuing. Read
`entire agent-help` and the relevant command help to confirm the commands
and flags supported by my installed CLI.

Create the project if needed, then create the repository in that project.
Wait until the repository is ready, then show me its status and remote
URL. Give me the Git command to clone it.
```

## Convert a GitHub Mirror to a Repository on Entire

Detach an existing GitHub mirror to make Entire your repository's canonical Git source. Detaching preserves the repository's identity, branches, tags, and existing trails and discussions. The GitHub repository stays live but is no longer synced with Entire.

### Before You Start

Make sure these requirements are met:

* The [Entire GitHub App](https://docs.entire.com/guides/repositories/github-app-access.md) is installed.
* The repository has exactly one mirror placement, including suspended mirrors. Delete any extra placements before detaching.
* The target project's primary processing cell matches the remaining placement's cell.
* You hold `mirror_source_admin` on the repository group. `manage_settings` alone is insufficient.
* You are a GitHub admin of the source repository. Entire verifies this directly with GitHub using the installation token.
* You are an admin of the target project.
* The repository name is available in the target project.
* No mirror removal is pending or in progress for the placement.
* The initial import from GitHub is complete.

> [!WARNING]
>
> The target [Entire project](https://docs.entire.com/guides/configuration/projects.md) controls who has member access to the native repository after detaching. Access through GitHub and grants on the mirror are removed. Add everyone who still needs access to the target project before detaching.

### Detach from GitHub

> [!WARNING]
>
> Detaching takes about one minute. Writes are temporarily frozen while Entire converts the repository. Wait for the detach to finish before pushing changes.

**entire.com**

1. Open the repository on [entire.com](https://entire.com).
2. Go to **Settings**, then **General**.
3. Scroll down to **Detach from GitHub**.
4. Enter the repository name to confirm, then click **Detach**.

[Detach a GitHub Mirror on entire.com](https://customer-0x5hsk8lh27fm00g.cloudflarestream.com/0db0939c52b1f0bf8670c1b342e0caf7/iframe)

**CLI**

Before you start, [install the Entire CLI](https://docs.entire.com/installation.md) and log in with `entire login`. If your installed CLI does not recognize `entire repo mirror detach`, update it to a version that includes the command.

#### 1. Preview the Detach Plan

Run a dry run to check whether the repository meets the requirements:

```bash theme={null}
entire repo mirror detach /gh/<owner>/<repo> --into /et/<project>/<repo> --dry-run
```

Replace `/gh/<owner>/<repo>` with the GitHub mirror's reference. The `--into` value names the target Entire project and the new repository name as a single `/et/<project>/<repo>` reference. The project is resolved by name.

`--dry-run` shows the plan without making changes. Resolve any unmet requirements before continuing.

#### 2. Detach the Repository

Run the command without `--dry-run`, review the plan, and confirm:

```bash theme={null}
entire repo mirror detach /gh/<owner>/<repo> --into /et/<project>/<repo>
```

Every run checks the plan before detaching. Entire freezes writes, waits for the mirror to match GitHub, and converts it to a repository hosted on Entire in the same cell.

To skip the confirmation prompt, pass `--yes` (or `-y`). This is required when running without a terminal. It does not override unmet requirements.

By default, the command waits up to 30 minutes for the detach to finish. Use `--timeout` to change the wait, or `--timeout 0` to wait indefinitely. Use `--no-wait` to return once the repository is native, without waiting for the remaining work to finish. Add `--json` for machine-readable output.

If the detach remains unfinished, follow the `entire api` command printed by the CLI to check its status or resume it.

#### 3. Update Your Git Remote

After detaching, the old `/gh/` address reports that the repository has moved. Clone the new repository:

```bash theme={null}
entire repo clone /et/<project>/<repo>
```

For an existing checkout, update its remote instead:

```bash theme={null}
git remote set-url origin entire://<host>/et/<project>/<repo>
```

Replace `<host>` with the repository's cluster host. Detaching keeps the repository in its existing cell.

### After Detaching

Consider archiving the original GitHub repository to avoid confusion about where to push changes. Entire is now the canonical Git source, and changes made on GitHub are no longer synced to Entire.
