Code and repositories / Monorepos
Work on several repositories as one
Your work spans a public library, its docs site and a private service, and one change touches two or three of them. A monorepo puts them side by side: one checkout, one search, one pull request across members, and one context for your agent.
2 min read
Without a monorepo, you clone each repository by hand, and you tell your agent about each one. A monorepo on TanStack Source is a repository with members. Each member stays its own repository, with its own history and its own access. Nothing is copied between repositories.
Set it up
- Make a monorepo: add member repositories to a repository of your organization.
- Add and remove members: change the members later, or make an existing repository a monorepo.
- Mix public and private members: keep the private members private.
- Clone and sync a monorepo: get every member in its own folder with one command.
Work across the members
- Change several members in one pull request: open one monorepo pull request, review its parts, and merge them all with one action.
- Test a change across members in CI: build each part with the other members next to it, and run the monorepo's own checks.
- Give an agent a monorepo: one session, one token and one
agents.mdfor all members, and factory agents that work across members.
How a checkout looks
platform/ the monorepo's own clone (root files, such as AGENTS.md)
platform/web/ a normal clone of acme/web
platform/docs/ a normal clone of acme/docs
platform/billing/ a normal clone of acme/billing
Each folder is a normal git clone, with its own .git. Nothing in a member names the monorepo.