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

# repo

> Manage Entire Repositories and GitHub mirror placements.

Manage Entire Repositories.

```bash theme={null}
entire repo COMMAND
```

## Repository References

Commands that take a `REPO` accept a forge-qualified reference that names where the repository lives:

| Reference | Meaning |
| - | - |
| `/et/PROJECT/REPO` | An Entire repository in a project. |
| `/gh/OWNER/REPO` | A GitHub repository that Entire mirrors. |

A trailing `.git` is never part of a repository name, so `/et/PROJECT/REPO` and `/et/PROJECT/REPO.git` address the same repository.

A bare `OWNER/REPO` names no forge, so Entire refuses it and suggests the qualified spellings. A GitHub URL such as `github.com/OWNER/REPO` is refused too, so that one repository has one spelling: the mirror, clone, remote, and grant commands name the `/gh/OWNER/REPO` form to use instead, while the rest report the reference they expected.

Which reference a command takes depends on what it acts on:

| Commands | Accepted |
| - | - |
| `repo clone`, `repo mirror add\|remove`, `repo remote add` | `/gh/` and `/et/` references. |
| `repo view` | `/et/` and `/gh/` references, or an `entire://` clone URL. A ULID or a bare name is refused. |
| `repo edit`, `repo delete`, `repo protection`, `repo visibility get` | An `/et/` path, a bare name with `--project`, or a repository ULID. A `/gh/` reference is refused by name — pass the mirror's ULID instead, since a mirror belongs to no project. |
| `repo grant add`, `repo grant remove` | An `/et/` path only. A mirror's access is the upstream GitHub repository's. |
| `repo grant list` | `/et/` and `/gh/` references. |

> [!NOTE]
>
> A GitHub mirror's visibility and branch protection are the upstream repository's, managed on GitHub. `repo protection list` says so rather than returning an empty rule set.

## `entire repo create`

Create a repository in a project.

```bash theme={null}
entire repo create NAME [flags]
```

A name ending in `.git`, in any letter case, is refused.

By default the command waits for provisioning to become active. Active means provisioning completed; later pushes or mirror creation can still fail for other reasons. If creation succeeds but readiness cannot be confirmed, the command exits nonzero and preserves the repository result. Do not create the repository again to recover.

| Flag | Description |
| - | - |
| `--json` | Output raw JSON instead of a table. Standard output carries one repository object, while progress and recovery instructions go to standard error. |
| `--no-wait` | Return after creation without confirming provisioning readiness. |
| `--object-format FORMAT` | Git object format: `sha1` or `sha256`. Defaults to the server default. |
| `--project PROJECT` | Owning project name or ULID. Required. |
| `--wait-timeout DURATION` | Time limit for project resolution, creation, and provisioning readiness. Must be positive. Defaults to `10m0s`. Applies to `--no-wait` runs too. |

## `entire repo list`

List repositories in a project.

```bash theme={null}
entire repo list --project PROJECT [flags]
```

By default at most 1,000 repositories are fetched, and a note on standard error says so when the project has more. Rows come in server order; this list has no local filters or sort. With `--json`, a paged response wraps rows in an `{items, nextPageToken}` envelope.

| Flag | Description |
| - | - |
| `--all` | Fetch every repository instead of the first 1,000. Slower on large projects. |
| `--json` | Output raw JSON instead of a table. |
| `--limit N` | Fetch and show only the first N repositories. `0` uses the default fetch budget. |
| `--no-pager` | Print directly to standard output instead of a pager. |
| `--page-size N` | Fetch a single page of at most N entries, from 1 to 500, and print the resume cursor. The server may cap N further. |
| `--page-token TOKEN` | Fetch the single page at this cursor, from a previous run's `nextPageToken`. |
| `--project PROJECT` | Project to list, by name or ULID. Required. |

## `entire repo view`

Show a repository: its name, visibility, and one row per cluster it is placed on, with that cluster's role, clone URL, and status.

```bash theme={null}
entire repo view REPO [flags]
```

`REPO` names its forge, and nothing else addresses a repository here:

| Form | Shows |
| - | - |
| `/et/PROJECT/REPO` | An Entire repository's primary cluster and each mirror of it, plus seeding progress while a mirror is being created. |
| `/gh/OWNER/REPO` | A GitHub upstream, with its mirror on every cluster. This is the `mirror list` `NAME` column. |
| `entire://CLUSTER/...` | The repository behind a clone URL, as `git clone` takes it. A trailing `.git`, as pasted from `git remote -v`, resolves the same repository. |

The `CLUSTER` column prints the public host that `--cluster` accepts elsewhere. Primary and mirror rows share one status vocabulary, such as `ready`, `processing`, or `failed`. A state the CLI does not recognize is shown as the server reports it.

A clone URL is looked up on the login server fronting its cluster, so it resolves even when that cluster belongs to another federation. Every other form is looked up on the active context's login server.

This command does not wait. It exits successfully when it can read the repository, even if provisioning is still in progress or has failed. For scripting, use `--authoritative --json` and inspect `state`, where `active` means provisioning completed.

Examples:

```bash theme={null}
entire repo view /et/acme/web
entire repo view /gh/octocat/hello-world
entire repo view /et/acme/web --json
entire repo view entire://aws-us-east-2.entire.io/et/acme/web
```

| Flag | Description |
| - | - |
| `--authoritative` | Fail rather than leave the status cell blank when the server cannot confirm provisioning state. |
| `--json` | Output raw JSON instead of a table. |

## `entire repo edit`

Edit a repository's settings.

```bash theme={null}
entire repo edit REPO --visibility VISIBILITY [flags]
```

`--visibility public` grants read-only access to any authenticated Entire user, while push and repository management stay restricted to grantees. `--visibility private` restricts the repository to explicit grantees. The caller needs manage permission on the repository.

```bash theme={null}
entire repo edit /et/my-project/my-repo --visibility private
```

| Flag | Description |
| - | - |
| `--json` | Output raw JSON instead of a table. |
| `--project PROJECT` | Owning project name or ULID. Required when `REPO` is a bare name, and redundant with a `/et/PROJECT/REPO` path or a ULID. |
| `--visibility VISIBILITY` | Visibility to set: `public` or `private`. Required. |

## `entire repo clone`

Clone an Entire repository, a GitHub mirror, or a full `entire://` clone URL.

```bash theme={null}
entire repo clone REPO [TARGET_DIR] [flags]
```

`REPO` takes one of three forms:

| Form | Behavior |
| - | - |
| `/et/PROJECT/REPO` | An Entire repository. Entire looks up every cluster it is readable from: its home cluster and any ready native mirrors. |
| `/gh/OWNER/REPO` | A GitHub mirror. Entire looks up the clusters the repository is mirrored on. |
| `entire://CLUSTER/gh/OWNER/REPO` | A full clone URL, which already names the cluster. Entire passes it straight to `git clone` with no lookup, and `--cluster` is ignored. |

With either reference, a single cluster is cloned directly. When the repository is readable on several, an interactive terminal prompts you to pick one. Without a terminal, an `/et/` repository falls back to its own primary cluster, while a `/gh/` mirror falls back to `aws-us-east-2.entire.io` and errors asking for `--cluster` if the mirror is not placed there. Pass `--cluster` to choose either way, or `--nearest` to let Entire measure.

The optional `TARGET_DIR` is passed through to `git clone` in every case.

Examples:

```bash theme={null}
entire repo clone /et/my-project/example
entire repo clone /gh/octocat/hello-world
entire repo clone /gh/octocat/hello-world ./hello-world
entire repo clone /gh/octocat/hello-world --cluster aws-us-east-2.entire.io
entire repo clone /gh/octocat/hello-world --nearest
entire repo clone entire://aws-us-east-2.entire.io/gh/octocat/hello-world
```

| Flag | Description |
| - | - |
| `--cluster HOST` | Cluster to clone from when the repository is readable on more than one. For a `/gh/` reference it may belong to another auth context. |
| `--nearest` | Time a connection to each cluster and clone from the fastest, instead of prompting. It orders the prompt by distance, and replaces the no-terminal default — an `/et/` repository's primary cluster, or `aws-us-east-2.entire.io` for a `/gh/` mirror — when that default was measured and lost. Cannot be combined with `--cluster`: both choose a cluster, so Entire asks you to pass one. |

The `--nearest` timing is local, and the control plane is never told where you are. Each candidate cluster does see a connection from you, where without the flag only the one you clone from would.

## `entire repo delete`

Delete a repository.

```bash theme={null}
entire repo delete REPO [flags]
```

| Flag | Description |
| - | - |
| `-f, --force` | Skip the confirmation prompt. |
| `--project PROJECT` | Owning project name or ULID. Required when `REPO` is a bare name, and redundant with a `/et/PROJECT/REPO` path or a ULID. |
| `-y, --yes` | Skip the confirmation prompt. Alias for `--force`. |

## `entire repo mirror add`

Register a mirror placement on one or more clusters.

```bash theme={null}
entire repo mirror add [REPO] [flags]
```

With no arguments, `entire repo mirror add` opens an interactive wizard to choose repositories and regions, then creates every repository and region pair in parallel and prints the clone URLs. `--cluster` requires a `REPO`.

With a `REPO`, the command places it on every cluster named by `--cluster` in parallel, then waits for each to become usable. Repeat the flag or comma-separate the hosts for several. Placement is idempotent for a given repository and cluster, so naming one the repository is already on reports it rather than failing.

Every cluster is attempted independently: one that fails does not stop the others, and the command exits nonzero naming the ones that did.

Alongside the clone URLs, the command suggests [`entire repo remote add origin --override`](#entire-repo-remote-add) to repoint an existing checkout at the new mirror.

### GitHub and Entire Repositories

| Reference | Behavior |
| - | - |
| `/gh/OWNER/REPO` | Mirrors the GitHub upstream. When `--cluster` is omitted, an interactive terminal offers the available clusters as a multi-select, and a non-interactive run defaults to `aws-us-east-2.entire.io`. |
| `/et/PROJECT/REPO` | Places replicas of an Entire repository and waits for each to be seeded. A native mirror goes in a region other than the repository's own, so only those clusters are offered and `--cluster` has no default. A non-interactive run must name one. |

Examples:

```bash theme={null}
entire repo mirror add
entire repo mirror add /gh/octocat/hello-world
entire repo mirror add /gh/octocat/hello-world --cluster aws-us-east-2.entire.io
entire repo mirror add /gh/octocat/hello-world --cluster aws-us-east-2.entire.io,aws-eu-central-1.entire.io
entire repo mirror add /et/acme/web --cluster aws-eu-central-1.entire.io
```

| Flag | Description |
| - | - |
| `--cluster HOST` | Cluster host to mirror onto. Repeat the flag or comma-separate hosts for several. A terminal offers a multi-select when this is omitted; for a `/gh/` reference other runs use `aws-us-east-2.entire.io`. |
| `--no-wait` | Return once the placements are registered, without waiting for the initial clone. |
| `--timeout DURATION` | How long to wait for mirror request submission, placement, and clone readiness. `0` waits indefinitely. Defaults to `30m0s`. |

## `entire repo mirror list`

List repositories you can see: existing mirrors and GitHub repositories you could onboard.

```bash theme={null}
entire repo mirror list [flags]
```

GitHub is the default view. Pass `--forge et` for Entire repositories and where each is placed, or `--forge all` for both in one table. The `NAME` column always prints the forge-qualified reference the other commands take.

Existing mirrors appear once per repository, with their clusters and status. Available GitHub repositories show access and availability instead of placement details. Sparse cells show `-`. Use [`entire repo view /gh/OWNER/REPO`](#entire-repo-view) for per-cluster clone URLs.

Filters and `--sort` apply to the fetched rows, so combine them with `--all` to work over the complete list.

| Flag | Description |
| - | - |
| `--access ACCESS` | Filter available repositories by `read`, `write`, or `admin`. |
| `--all` | Fetch the complete directory instead of the first 1,000 entries. |
| `--available` | Show GitHub repositories that can be onboarded. |
| `--cluster HOST` | Show only repositories mirrored on this cluster, by public host as the `HOST` column of `entire cluster list` prints it. A cluster slug is refused. Drops onboardable candidates. |
| `--forge FORGE` | Which repositories to list: `gh` for GitHub mirrors and onboardable GitHub repos, `et` for Entire repositories, or `all` for both. Defaults to `gh`. |
| `--json` | Output raw JSON instead of a table. |
| `--limit N` | Show at most `N` rows after filters and sorting. |
| `--mirrored` | Show repositories with mirror placements. |
| `--name NAME` | Filter by a substring of the `NAME` column, such as `acme/web` or `/gh/acme`, case-insensitively. |
| `--no-pager` | Print directly to standard output. |
| `--owner OWNER` | Filter by upstream owner. |
| `--page-size N` | Fetch one page of `N` entries, from 1 to 500. |
| `--page-token TOKEN` | Fetch one page from a previous response cursor. |
| `--private[=false]` | Show private repositories, or public repositories when set to `false`. |
| `--sort KEY` | Sort by a column key. Prefix the key with `-` for descending order. |
| `--status STATUS` | Filter by mirror or onboarding status. |

## `entire repo mirror remove`

Remove mirror placements from one or more clusters.

```bash theme={null}
entire repo mirror remove REPO [flags]
```

The command removes the placements on every cluster named by `--cluster`, in parallel. Other clusters' placements of the same repository, and the repository itself, are unaffected. Removing a mirror placement does not delete or rewrite an upstream GitHub repository.

There is no default cluster. Which clusters a repository is on is a property of the repository, so guessing one would delete a copy you never named. With `--cluster` omitted, a terminal offers the clusters the repository is actually mirrored on as a multi-select, with each placement's status; nothing starts ticked, so the selection doubles as the confirmation. A non-interactive run must name the clusters.

An Entire repository's own primary cluster is listed but never removable — use [`entire repo delete`](#entire-repo-delete) for that. Teardown is asynchronous, so the command waits for each placement to disappear.

Examples:

```bash theme={null}
entire repo mirror remove /gh/octocat/hello-world
entire repo mirror remove /gh/octocat/hello-world --cluster aws-eu-central-1.entire.io
entire repo mirror remove /et/acme/web --cluster aws-eu-central-1.entire.io,aws-ap-south-1.entire.io
```

| Flag | Description |
| - | - |
| `--cluster HOST` | Cluster host to remove the mirror from. Repeat the flag or comma-separate hosts for several. A terminal offers a multi-select when this is omitted. |
| `--timeout DURATION` | How long to wait for each placement to be torn down. `0` waits indefinitely. Defaults to `30m0s`. |

## `entire repo remote add`

Add a Git remote that goes through Entire instead of the forge.

```bash theme={null}
entire repo remote add REMOTE_NAME [REPO] [flags]
```

The repository is resolved from the current clone's remotes; pass `REPO` to name a different one. With more than one cluster to choose from, a terminal gets a picker and a script gets the repository's own cluster. `--cluster` selects one either way, the same as [`entire repo clone`](#entire-repo-clone).

`REMOTE_NAME` must not already exist. As with `git remote add`, an occupied name is refused rather than repointed.

The command only ever edits local Git configuration. The cluster must already serve the repository, so create the placement with [`entire repo mirror add`](#entire-repo-mirror-add) first; nothing server-side is changed.

Examples:

```bash theme={null}
entire repo remote add entire
entire repo remote add entire --cluster aws-us-east-2.entire.io
entire repo remote add entire /gh/octocat/hello-world
entire repo remote add origin --override
```

| Flag | Description |
| - | - |
| `--cluster HOST` | Cluster host to use when the repository is on several. |
| `--override` | Repoint `REMOTE_NAME` when it already exists, instead of refusing. |

> [!WARNING]
>
> `--override` prints the URL it replaced, with any credentials redacted. That printout is the only record of the previous URL, so keep your own copy if you need it.

To find a clone URL without touching Git configuration, use [`entire repo view`](#entire-repo-view), which lists the URL for each cluster.

## `entire repo protection`

List, add, or remove a repository's branch-protection rules.

```bash theme={null}
entire repo protection SUBCOMMAND REPO [flags]
```

Each rule names a branch pattern and a level. **protected** refuses force pushes and deletion, while fast-forward pushes stay allowed. **server-side merge only** also refuses every direct push, so the branch moves only through a merge Entire performs, such as a trail merge.

A pattern is `HEAD` for the default branch, a branch name such as `main`, or a pattern with `*` and `?` wildcards such as `release/*`.

> [!NOTE]
>
> Branch protection applies to Entire repositories only. For a GitHub mirror, `entire repo protection list` says the rules are the upstream repository's. That note is part of the table output; with `--json`, standard output is `[]` and the note goes to standard error.

Every subcommand takes `--json` to print raw JSON instead of a table, and `--project PROJECT` to name the owning project when `REPO` is a bare name.

### `entire repo protection list`

Show a repository's branch-protection rules.

```bash theme={null}
entire repo protection list REPO [flags]
```

### `entire repo protection add`

Protect a branch, or change the level of an existing rule.

```bash theme={null}
entire repo protection add REPO BRANCH [flags]
```

A new rule protects the branch from force pushes and deletion. With `--server-side-merge-only`, every direct push is refused. Re-adding a branch without the flag keeps its current level; pass `--server-side-merge-only=false` to lower it. The command prints the resulting rules. The caller needs manage permission on the repository.

```bash theme={null}
entire repo protection add /et/acme/web main
entire repo protection add /et/acme/web 'release/*' --server-side-merge-only
```

| Flag | Description |
| - | - |
| `--server-side-merge-only` | Refuse every direct push, so the branch moves only through a merge Entire performs. Omit it to keep an existing rule's level, or pass `=false` to lower it. |

### `entire repo protection remove`

Remove a branch-protection rule.

```bash theme={null}
entire repo protection remove REPO BRANCH [flags]
```

`BRANCH` names the rule as it was added. Removing a branch that has no rule changes nothing. The command prints the resulting rules and needs manage permission on the repository.

## `entire repo grant`

Grant and revoke repository access, and list who can reach a repository.

```bash theme={null}
entire repo grant add REPO [GRANTEE] --role ROLE
entire repo grant list REPO
entire repo grant remove REPO [GRANTEE]
```

`entire repo grant list` answers for both forges: an `/et/` reference lists the repository's grants, and a `/gh/` reference lists who can pull the mirror. `add` and `remove` take `/et/` references only, because a mirror's access follows the upstream GitHub repository.

See [grant](/cli-reference/grant.md#entire-repo-grant) for roles, grantee syntax, and flags.

## `entire repo visibility get`

Show whether an Entire repository is public or private.

```bash theme={null}
entire repo visibility get REPO [flags]
```

Set visibility with [`entire repo edit --visibility`](#entire-repo-edit).

| Flag | Description |
| - | - |
| `--json` | Output raw JSON instead of a table. |
| `--project PROJECT` | Owning project name or ULID. Required when `REPO` is a bare name, and redundant with a `/et/PROJECT/REPO` path or a ULID. |

## Continue With

> **[Mirror a GitHub Repository](/learn/mirror-a-github-repository.md)**
>
> Create a mirror and use it from Git.

> **[Mirror Access and Permissions](/guides/repositories/mirror-access-and-permissions.md)**
>
> Understand GitHub-synced access, hourly collaborator sync, and offboarding.

> **[project](/cli-reference/project.md)**
>
> Manage the projects that own repositories.

> **[grant](/cli-reference/grant.md)**
>
> Grant and revoke repository access.
