Make a monorepo
Your team works on acme/web, acme/docs and acme/billing together. Each person clones them one by one, and nobody knows which folder layout the others use.
Add them as members of one repository, for example acme/platform. A repository with members is a monorepo. Everyone then gets the same checkout, with each member in its own folder.
You need the admin role on the monorepo and on each member.
1. Pick the monorepo
Use a new, empty repository, or one that holds only root files, such as an AGENTS.md for the whole monorepo.
The monorepo's own files are the root of the checkout. Keep the code of the members in the members.
2. Add a member
- Open the repository, then Settings. Under Monorepo, click Members. Only admins see this link. After the first member, the repository has a Members tab too.
- Under Add a member, type the Repository as
owner/name, for exampleacme/web. - Leave Folder empty to use the name of the repository. Type a folder to use another name.
- Click Add member.
The member shows in the list, with its folder, its visibility and its default branch.
3. Add the other members
Do step 2 again for each repository.
From a terminal, src monorepo member add does the same:
src monorepo member add acme/docs -R acme/platform
src monorepo member add acme/billing --folder pay -R acme/platform
Over REST, send POST /api/v1/repos/acme/platform/members with {"member": "acme/docs"}. Over MCP, the tool is add_monorepo_member.
Done
The home page of acme/platform now has a Members card. It lists each folder and its repository, with the command that clones them all:
src monorepo clone acme/platform
Next: clone and sync the monorepo.
Rules for members
- A member has the same owner as the monorepo.
- A fork cannot be a member.
- A monorepo cannot be a member, and a member cannot get members.
- A repository can be a member of more than one monorepo.
- A monorepo has at most 50 members.
- No member can use the folder
repo. A CI job keeps it for its own repository.
A public monorepo can have public members only. See Who can see a monorepo.
Rules for folders
- A folder is 1 to 100 letters, digits,
.,-or_. It starts with a letter or a digit. - Each member has its own folder.
- A folder cannot have the name of a file or folder at the root of the monorepo, for example
README.md.
Later: remove a member
- On the Members tab, click Remove on the member.
- Click Remove member.
The repository itself stays as it is. Its folder in existing checkouts stays too. You can add it again.
From a terminal, run src monorepo member remove acme/docs -R acme/platform.
When a member moves to another owner, it leaves the monorepo. When a member is deleted, it leaves too.