Skip to main content
Use Dashboard > Repositories 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:
box dashboard
# Open Repositories, choose a repository, and set its base branch.
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\"}"
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" },
});
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"))
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:
/home/user/<repository-name>
Box uses the GitHub repository name for the folder, not the owner/name pair. For example:
GitHub repoBox 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 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:
ariana-ide-private/backend/.env
That creates:
/home/user/ariana-ide-private/backend/.env