Lanes
GitHub

Agents · Gemini CLI

Gemini CLI for teams, without collisions

In shortRun lanes init --agents gemini in your repository and commit the result. Lanes writes .gemini/settings.json so that every Gemini CLI edit is committed as you and published to a shared branch, after waiting for any teammate editing the same file. Add lanes mcp to Gemini CLI so its agent can read the team brief and check a file before touching it.

Updated 2026-11-12 · Lanes 0.3.0 · Source on GitHub

Gemini CLI on a team

Gemini CLI has no idea another person's agent is editing the same repository, so it plans and writes against whatever is on disk when it starts. When two people's agents work in the same repository, one can overwrite the other's change in a shared file, or write new code against a function the other is renaming. Git shows the damage later, at merge time, after both agents have finished.

Lanes connects every agent on the team to one coordination server. Gemini CLI gets a team brief with each prompt, heads-ups about teammates' changes, and the rest of the team's agents see what Gemini CLI is changing.

What Lanes installs for Gemini CLI

Lanes adds its hooks to the project's .gemini/settings.json, next to your own project settings. Gemini CLI uses the same hook payload fields as Claude Code, so the same lease, sync, commit and publish steps run around each edit, and the prompt hook adds the team brief.

The file is committed with lanes init, so every teammate gets it when they pull. lanes off removes only the Lanes entries and leaves your own settings alone.

WhatGemini CLI with Lanes
Edits wait for a teammate's edit of the same fileYes
Each edit committed as you and published to lanes/mainYes
Team brief added to each promptYes
Heads-up before reading a teammate's fileNo
Check at the end of a turnNo
MCP team toolsYes

Set it up

  1. Get Lanes: git clone https://github.com/mfmatozza/lanes && cd lanes && npm ci && npm run build. The commands below write lanes for node /path/to/lanes/dist/lanes.cjs.
  2. In your repository, run lanes init --agents gemini and push the commit it makes.
  3. Turn on shared context once per repository: lanes team on, then commit .lanes/team.json.
  4. Add the MCP server to Gemini CLI:
gemini mcp add --scope user lanes node "/path/to/lanes.cjs" mcp
  1. Check the machine with lanes doctor.

Working alone, the first session starts a local Lanes server. For a team, one person runs lanes server --host 0.0.0.0 and invites the others with lanes invite <name>.

Things to know about Gemini CLI

  • Gemini CLI warns before running project hooks it has not seen, and skips .gemini/settings.json in a folder it does not trust when folder trust is on.
  • Add the MCP server with --scope user. Without it, Gemini writes the project's .gemini/settings.json, which is committed.

Status

Built from Gemini CLI's published documentation and covered by Lanes' automated tests. It has not yet been run against the real Gemini CLI. Issues and reports are welcome.

Mixed teams work: one person can use Gemini CLI while teammates use Claude Code, Codex or Cursor. Every agent reports to the same server, so the brief and the heads-up name each teammate's task whatever agent they run.

Questions

Will Lanes overwrite my Gemini project settings?

No. Lanes merges its hook entries into .gemini/settings.json and leaves everything else alone. lanes off removes only the Lanes entries.

Why --scope user for the MCP server?

Without it, gemini mcp add writes the project's settings file, which is committed and would put a path from your machine in the repository.

Does Gemini CLI get the read heads-up?

Not yet. The heads-up before an edit and the brief work; the read heads-up and end-of-turn check are Claude Code only in 0.3.0.