Multirepos and groups
Some products live in several repositories: an app, its backend, its docs. A multirepo tells Taxilane which repositories belong together, so one change can span several of them while each repository keeps its own worktree, its own environment and its own agent, and an agent for the whole multirepo coordinates them.
Nothing about a group is stored: Taxilane computes groups from Git and the multirepo’s declaration, so worktrees created by Herdr, Claude Code or plain git worktree add are grouped exactly like the ones Taxilane creates.
The multirepo
Section titled “The multirepo”A multirepo is declared by a .taxilane-multirepo.json file in a folder you choose, written by the taxilane multirepo commands (or the desktop app), never by hand:
{ "name": "Product", "repos": { "docs": "product-docs", "app": "product-app", "api": "product-api" }, "worktreesRoot": "../product-worktrees", "defaultRepos": ["app", "api"], "workspace": { "alias": "workspace", "default": false }, "env": { "app": { "API_URL": "http://localhost:${port:api.http}" } }}nameis optional: the name the multirepo is shown with in the sidebar,taxilane multirepo show, the agents’ context and Herdr. Without it, the multirepo is named after its folder, which is handy when a workspace repository’s folder isn’t named after the product. Paths and aliases never depend on it. It can have at most 80 characters and no control or text-direction characters.reposmaps an alias (lowercase letters, digits and hyphens) to a repository’s path, relative to the folder or absolute. The repositories don’t need to share a parent folder.worktreesRootis a common folder under which each repository’s worktrees folder is proposed as<worktreesRoot>/<alias>.defaultReposare the repositoriestaxilane new <id>covers when run in the multirepo folder.workspaceis optional:false, or an object with thealiasof the workspace repository and whether it is adefaultrepository. Files without it keep working.envis optional: the variables the multirepo shares with each repository’s worktrees.
The folder is outside every repository, or the top level of a workspace repository that versions what the repositories share (an AGENTS.md, the declaration) and ignores the nested repositories. It’s never a subfolder of a repository, so the declaration never ends up inside a repository that isn’t yours.
Taxilane remembers the multirepos it knows in ~/.taxilane/multirepos.json, a file of its own, together with their approval and the multirepo agent set on this machine; projects.json and settings.json keep their format, so an earlier version keeps working with them.
The multirepo agent, the command taxilane open --herdr runs in the multirepo folder, is set with taxilane multirepo agent (or the multirepo settings in the app) and kept on this machine; it’s claude, without Headroom, until you set another (--headroom wraps it with headroom wrap). It’s never read from the declaration: a declaration written by an earlier version may still hold an agent, which is ignored (taxilane multirepo show says so) and dropped the next time Taxilane writes the file.
If a multirepo’s folder moves, run taxilane multirepo init in its new place (or add the folder from the desktop app): instead of refusing, it shows the declaration for review as taxilane multirepo trust does, and once you approve it, registers it as it is and registers a project for each declared repository that has none, proposing <worktreesRoot>/<alias> as add-repo does. Neither init nor the desktop app forgets an entry of ~/.taxilane/multirepos.json on its own: while its declaration can’t be read (a volume that isn’t mounted, a moved or deleted folder) commands ignore it, the desktop app lists it as unavailable with “Remove”, and taxilane multirepo trust <folder> --revoke forgets it from the command line, saying why its declaration can’t be read (taxilane doctor lists these multirepos with their folders). When the volume is mounted again the multirepo is back as it was, still approved and with its local agent.
cd ~/projects/producttaxilane multirepo init # writes .taxilane-multirepo.json, worktreesRoot ../product-worktreestaxilane multirepo name "Product" # optional; --clear goes back to the folder's nametaxilane multirepo add-repo app product-app # reuses product-app's project, or registers onetaxilane multirepo add-repo api product-apitaxilane multirepo defaults app,apitaxilane multirepo agent claudetaxilane multirepo showAdding a repository reuses its Taxilane project unchanged (settings, agents, local files). If it has none, a project is registered with the defaults the desktop app proposes. Taxilane then proposes <worktreesRoot>/<alias> as the project’s worktrees folder, so the disk ends up organised like Herdr’s spaces (product-worktrees/app/TASK-12, product-worktrees/api/TASK-12). It asks in a terminal, accepts --use-worktrees-root or --keep-worktrees-folder, never changes it in --json mode, and doesn’t ask when the folder already matches. Changing the folder only affects worktrees created afterwards; existing ones stay where they are.
taxilane multirepo remove-repo <alias> and taxilane multirepo delete only change the declaration: projects, worktrees, branches, ports and Herdr workspaces are left as they were.
Approving a multirepo
Section titled “Approving a multirepo”A declaration can arrive with a clone, for example in a workspace repository, so Taxilane only uses a multirepo you approved on this machine. A .taxilane-multirepo.json that isn’t registered, or that changed since you approved it, is ignored: commands behave as outside a multirepo and print a note naming the file and taxilane multirepo trust (hooks stay silent).
taxilane multirepo trust # nearest declaration: shows it and askstaxilane multirepo trust --yes # approve without askingtaxilane multirepo trust --revoke # forget it; the file staystaxilane multirepo trust ~/projects/old --revoke # forget a known multirepo whose declaration can't be readThe review lists the declared name, each repository with the path it resolves to, the worktrees root, the workspace repository and the shared variables with their templates, and marks every path outside the multirepo folder’s parent. The approval covers exactly that: if a pull or a manual edit changes the name, a repository’s path, worktreesRoot, the workspace setting or a shared variable, the multirepo stops applying until you review it again. Changing defaultRepos doesn’t need a new approval. What Taxilane writes itself (taxilane multirepo init, add-repo, defaults…, the desktop app) stays approved, and those commands refuse to write a multirepo that needs review. Multirepos registered before this check existed need one review after updating.
Groups
Section titled “Groups”A group is a branch with exactly the same name, for example feature/TASK-12, in worktrees of two or more repositories of the multirepo, wherever each worktree lives. Prefixes aren’t interpreted (feature/TASK-9 and fix/TASK-9 are different branches), and main checkouts aren’t grouped. Worktrees that already exist with matching branches become a group in place: nothing is moved, renamed or changed, and running agents get the group’s context at their next SessionStart.
cd ~/projects/producttaxilane new TASK-12 # app and api (the defaults) get feature/TASK-12taxilane new TASK-12 --repos docs # later: docs joins the grouptaxilane status # every group, per repository, and the ungrouped worktreestaxilane open TASK-12 --herdr # each worktree under its repository's space, with its own agenttaxilane open --herdr # the multirepo's agent, in a Herdr workspace of its owntaxilane open TASK-12 --orca # the same in Orca, each worktree under its own Orca repositorytaxilane open --orca # the multirepo's agent, in Orca's workspace for the foldertaxilane clean --yes # remove the groups whose worktrees are all merged and idle- Creating.
taxilane new <id>does in each repository whattaxilane new <id>does there today (the project’s worktrees folder, the usual folder name, provisioning), except that the branch starts at that repository’sorigin/<base>. Repositories already on the branch are reported and left alone, an existing branch without a worktree is checked out, and a repository that fails doesn’t undo the others. Before creating anything, it checks the local files of every repository to create: if any of them is unavailable, no repository gets its worktree, and the command lists each unavailable file with its fix and the repositories it skipped. It opens nothing. Inside a repository,taxilane new <id>without--reposstill creates a single worktree. - Status. In the multirepo folder,
taxilane statuslists each group with, per repository, its path, changes, ahead/behind its own base (its recorded base, or the repository’s main branch), merged state (into that base or the main branch) and agents, then the ungrouped worktrees. - Opening.
taxilane open <id> --herdropens every worktree of the group as a single worktree opens, under its repository’s space with its environment and its project’s agent: a worktree whose agent is live is focused, one whose workspace is open without an agent gets its agent started in that workspace’s idle pane (its only pane, in the worktree, with its shell at its prompt) or, when it has several panes or its pane runs something, in a new pane, without closing any, and each is reported with its agent’s pane.<id>is a branch, or a task id when only one offeature/<id>andfix/<id>is a group.taxilane open --herdrtreats the multirepo agent’s workspace the same way. - Opening in Orca.
taxilane open <id> --orcaopens every worktree of the group, one after another, astaxilane open --orcaopens one: under its own Orca repository (registered when Orca doesn’t know it), with its environment, its project’s agent and its group session name. Each is reported as started or focused with its Orca terminal, and one that fails doesn’t stop the others. If you imported the multirepo in Orca as a group (“Group these repositories?”), its worktrees show nested under that group; Taxilane never moves repositories between Orca’s groups.taxilane open --orcaruns the multirepo agent in the Orca workspace whose path is the multirepo folder, focusing its live agent or starting the agent in a new terminal there. A multirepo folder that is a Git repository needs nothing: Taxilane registers it with Orca when needed and uses its main worktree. A folder that isn’t a Git repository can only get a workspace from Orca’s app, once: add the folder as a project, accept importing its repositories as a group and add a folder workspace to that group; or add it and choose “Open as Folder”. Until thenopen --orcafails explaining these steps and changes nothing in Orca. - Without a runner flag.
taxilane open <id>andtaxilane openopen in the runner in use, and the context Claude Code gets in the multirepo folder names it (taxilane open <id> --orcawhen Orca is in use). - Session names. When the agent is Claude Code, each session is started with a name:
<alias>-<id>for each worktree of the group (app-task-123,api-task-123) and the multirepo’s name for the multirepo agent, made unique with-2,-3… if a live session already has it.openreports the names (as session app-task-123,session_namein--json) andtaxilane statusshows them on each repository’s line (agents=claude(working, app-task-123),sessionsin--json), so the coordinating session can see which session runs in which repository and message each group member by name. - Cleaning up. A group is a candidate only when every worktree is clean and merged into its base and no agent runs in any of them.
--yesremoves its worktrees with each repository’s usual cleanup and the same options astaxilane clean(--delete-branches,--stop-emulators,--down-compose-projects…). After the groups,taxilane cleanalso lists the loose worktrees of each repository (including the workspace repository) that belong to no group, when they are clean, merged and have no agent, and removes them under the same confirmation.
Shared variables
Section titled “Shared variables”The repositories of a group often need each other’s ports: the app worktree of feature/TASK-12 should talk to the backend running in its own api worktree, not to whatever listens on a fixed port. The multirepo’s env gives that link. It maps an alias to the variables the multirepo adds to that repository’s worktrees, and a value can use ${port:<alias>.<key>}, the port that repository reserves for its key <key>:
{ "env": { "SERVER_PORT": "${port:http}" } }
// .taxilane-multirepo.json{ "env": { "app": { "API_URL": "http://localhost:${port:api.http}" } } }- Which port. A worktree of
appgets the port ofapi’s worktree on the same branch, its partner in the group. Whenapihas no worktree on that branch (a looseappworktree, a group withoutapi, orapp’s main checkout), it gets the port ofapi’s main checkout. The port isapi’s own reservation: resolvingapp’s environment reserves it inapi’s worktree exactly asapi’s owntaxilane envwould, so both see the same number. - Templates. Besides
${port:<alias>.<key>}, values can use${worktree}(the folder of the worktree receiving the variable) and$$. A repository’s own ports,${port}and${port:<key>}, are declared in its.taxilane.json, not here. Names and values follow the rules of a repository’senv, reserved names included. - Delivery. Shared variables reach the worktree wherever its own variables do:
taxilane env, theSessionStarthook, opening in the terminal or Herdr, and theenvFile. A variable the repository’s own.taxilane.jsondeclares wins over a shared one with the same name, and a shared one wins over a provider’s. - Approval. They apply while the multirepo is approved, whatever the receiving repository’s approval. The referenced repository must be approved, since its ports are only reserved once it is.
- When it can’t be resolved. If
apiisn’t approved, doesn’t declare the key, or its worktree can’t be read, the variable is left out:taxilane envsays why on standard error and the session’s context names it; everything else is delivered. - Refreshing. A session keeps the value it started with. When
api’s partner worktree is created afterapp’s session started, the nexttaxilane env, new session or opening picks it up.
Shared variables are edited with taxilane multirepo env or in the multirepo settings of the desktop app:
taxilane multirepo env # list themtaxilane multirepo env set app API_URL 'http://localhost:${port:api.http}' # add or replace onetaxilane multirepo env unset app API_URL # remove itQuote the template with single quotes so the shell leaves ${…} alone. Each change is checked with the rules above before anything is written, and keeps the multirepo approved like every other write of Taxilane; a multirepo that needs review must be reviewed first. Editing the file by hand still works, and is then reviewed with taxilane multirepo trust.
Renaming a repository (or declaring the workspace repository under another alias) moves its shared variables and rewrites the ${port:<alias>.<key>} references to it. Removing a repository, or turning the workspace repository off, drops its own shared variables, and is refused while another repository’s variable references it: change or unset those first. An earlier version of Taxilane that rewrites the declaration drops the shared variables.
Context for the agents
Section titled “Context for the agents”Agents don’t need to message each other to know about the group: Claude Code’s SessionStart hook gives each one its context.
- In a group worktree, the context names the group, the other repositories with the path of their worktree, the repositories not in the group with how to add them, and the
AGENTS.mdof the repositories that have anopenspecfolder. - In the multirepo folder, it lists the repositories, points to the folder’s
AGENTS.mdwhen there is one, and totaxilane status,taxilane newandtaxilane open. In a workspace repository, the main checkout’s usual rules follow.
In the desktop app
Section titled “In the desktop app”The desktop app shows the same multirepos and groups, computed the same way: a folder in the sidebar, a view grouped by change with each group’s combined state and actions, group tags in the other views, and dialogs to add a multirepo, create a change and edit its settings, shared variables included, all writing through the same use cases as taxilane multirepo and taxilane new. See Multirepos in the desktop app.
A workspace repository
Section titled “A workspace repository”When the multirepo folder is the top level of a Git repository, taxilane new, status, open and clean run in its main checkout act on the multirepo, and the folder is detected as the multirepo’s workspace repository with the alias workspace, with no declaration needed:
- It joins groups like any other repository:
taxilane new TASK-12 --repos workspace,appcreates its worktree in<worktreesRoot>/workspace/TASK-12. It is not one of thedefaultReposunless you say so. taxilane multirepo showlists it markeddetected.taxilane multirepo workspace set [--alias <alias>] [--default]declares it in the file ("workspace": { "alias": … }),taxilane multirepo workspace clearturns detection off ("workspace": false), andtaxilane multirepo workspace detectremoves the field, so the folder is detected again asworkspace(and no longer a default repository). Areposentry with the path.also makes the folder the workspace repository, under that alias.- The folder is not a project of its own: the sidebar lists its worktrees under the multirepo, and
taxilane project addandtaxilane apprun in the folder register the workspace repository once, as a member of the multirepo, instead of a loose project. With detection off, the folder is an ordinary project again. - The multirepo agent (the one running in the folder) is shown in the multirepo view. Its Claude Code session records are kept in the folder’s Git directory when it is a repository, and otherwise in a store under
~/.taxilane/agent-sessions/keyed by the folder, so theagent-statehook works in a multirepo folder that isn’t a repository too. Only an agent whose working directory is exactly the folder counts as the multirepo agent; one in a member repository belongs to that repository’s worktree.
In its linked worktrees, commands behave as in any repository.