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

# Repositories

> Choose which GitHub repositories Box clones into each VM.

Use [Dashboard > Repositories](https://box.ascii.dev/box/dashboard?tab=repos) to choose the GitHub repositories that Boxes should clone. You can also select a repository programmatically by using the `databaseId` returned from the repository list:

<CodeGroup>
  ```bash CLI theme={null}
  box dashboard
  # Open Repositories, choose a repository, and set its base branch.
  ```

  ```bash curl theme={null}
  repo_id=$(curl -sS "$BOX_API_BASE/repos?sync=true&q=ariana-ide-private" \
    -H "Authorization: Bearer $BOX_API_KEY" \
    | jq -r '.installations[0].repositories[0].databaseId')

  curl -sS -X POST "$BOX_API_BASE/repos" \
    -H "Authorization: Bearer $BOX_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"repositoryId\":\"$repo_id\",\"baseBranch\":\"dev\"}"
  ```

  ```ts TypeScript theme={null}
  const repos = await box.repos({ sync: true, q: "ariana-ide-private" });
  const repo = repos.installations.flatMap((installation) => installation.repositories)[0];

  await box.selectRepo({
    repoSelectionRequest: { repositoryId: repo.databaseId, baseBranch: "dev" },
  });
  ```

  ```python Python theme={null}
  from ascii_box_sdk.models.repo_selection_request import RepoSelectionRequest

  repos = box.repos(sync=True, q="ariana-ide-private")
  repo = repos.installations[0].repositories[0]

  box.select_repo(RepoSelectionRequest(repository_id=repo.database_id, base_branch="dev"))
  ```
</CodeGroup>

Selected repositories are cloned when a Box starts. On the hosted Box image, the SSH user is `user` and the work directory is `/home/user`, so a selected repository is available at:

```bash theme={null}
/home/user/<repository-name>
```

Box uses the GitHub repository name for the folder, not the owner/name pair. For example:

| GitHub repo                         | Box path                        |
| ----------------------------------- | ------------------------------- |
| `ariana-dot-dev/ariana-ide-private` | `/home/user/ariana-ide-private` |
| `octocat/hello-world`               | `/home/user/hello-world`        |

If a Box has one selected repository, Box uses that repository folder as the main project directory for agent tools. If a Box has multiple selected repositories, `/home/user` stays the parent workspace and each repository is a sibling folder.

## Branches

Each selected repository has a base branch. Box clones that branch first.

Box does not create a new branch automatically, including for forked Boxes. Repositories stay on the configured base branch unless you or a command inside the Box changes branches.

## Secret Files

Secret file paths in [Dashboard > Secrets](https://box.ascii.dev/box/dashboard?tab=secrets) are relative to the Box work directory, `/home/user`. The secrets dashboard does not have a repository selector, so include the repository folder name when you want to write inside a selected repository.

For example, if you selected `ariana-dot-dev/ariana-ide-private` and want to create `.env` under its `backend` folder, use:

```text theme={null}
ariana-ide-private/backend/.env
```

That creates:

```bash theme={null}
/home/user/ariana-ide-private/backend/.env
```

## Related

* [Secrets & Setup](/box/secrets)
* [SSH Access](/box/ssh-access)
