Foremerge CLI

A CLI and MCP server where parallel coding agents declare what they will change and see intent conflicts before any code

  • 521 ★ on the repository
  • Last commit
CLI

Extended access

Why this level

  • Installing through `curl ... | sh` runs a script from foremerge.com, and `foremerge setup` adds an MCP entry and a skill to client settings
  • Foremerge itself runs the registered validation commands in your repository, so register only fast and safe ones
All reasons and checks

naw103/foremerge

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/foremerge

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Installing through `curl ... | sh` runs a script from foremerge.com, and `foremerge setup` adds an MCP entry and a skill to client settings
  • Foremerge itself runs the registered validation commands in your repository, so register only fast and safe ones

This is third-party code. Review the repository files before installing.

What it does

Foremerge helps several coding agents work on one repository in separate git worktrees without undoing each other. Git compares text and notices when two agents edit the same part of a file. Say one agent moves every caller onto `StripePaymentService` while another adds PayPal to the old `PaymentService`. No lines overlap, and the merge goes through. The PayPal work ends up stranded on a class nobody calls. Before editing, each agent publishes an intent: a kind of scope (`symbol`, `api`, `schema`, `config`, `file` and others), a key and an operation such as `replace` or `extend`. Intents live in a SQLite database inside the `.git` directory, so every agent on the machine sees them: Claude Code, Codex, Cursor. The conflict detector uses no model and gives the same answer for the same input. Work moves from intent to acceptance. The agent declares and claims a scope, edits the code and publishes a ChangeSet. Foremerge then runs the validations set with `foremerge checks set` and accepts the change. The package includes a short `fmg` command, a `--json` mode and the MCP server `foremerge mcp`.

Who it is for. For developers who run several agents in parallel in different worktrees and want to learn about clashing plans before the merge.

Good fit when

  • Two or three agents work on one repository in separate worktrees
  • One task replaces a component while another extends it, and git stays silent at merge
  • You want to check a plan before work starts with `foremerge conflicts check`
  • You need a record of accepted changes: each entry carries the agent, the model, the validation result and a hash-chained event log

Not a fit when

  • You work with a single agent: there is nobody to coordinate with
  • Agents run on different machines: coordination across computers is outside the project's scope
  • You need hard file locks: Foremerge only warns
  • You need a mature, stable interface: the project is at version 0.5.1 and public schemas may still change

Example request

Before editing, publish an intent to replace PaymentService with StripePaymentService and check whether any other agent is working on the same thing.

Limitations

Foremerge stays an MVP until 1.0: public schemas may change and no benchmark results are published yet. Coordination works on one computer. The database lives at `<git-common-dir>/foremerge/state.sqlite3`, and placing that file on a network share gives no distributed safety.

Prebuilt binaries exist for macOS, Linux and Windows. The npm package currently ships for macOS and Linux with glibc, and on Windows you take the binary from the releases page. Building from source needs Rust 1.85 or newer, and the examples in the guide need a recent Git and `jq`.

Foremerge does not merge, rebase, cherry-pick or push. It shows overlaps, keeps a log and runs validations. The hash-chained event log is tamper evidence and does not act as a remote user's signature.

How to disable. Remove the `foremerge` MCP entry and the skill file from the settings of every client you ran `foremerge setup` for. Then delete the `foremerge` binary (it lives in `~/.local/bin` by default) and the `foremerge` directory inside the repository's git directory.

FAQ

How is Foremerge different from git?

Git catches overlapping lines. Foremerge compares declared intents: if one agent replaces `PaymentService` and another extends it, the warning arrives before any code, even when the files differ.

How do I install Foremerge?

On macOS and Linux use `curl -fsSL https://foremerge.com/install.sh | sh` or `npm install -g foremerge`. The installer puts the `foremerge` and `fmg` commands in `~/.local/bin`. Then run `foremerge init` in your repository.

Does Foremerge lock files or agents?

No. Warnings are advisory, so one crashed agent does not stall the others. You record your decision about a conflict with `foremerge assess record`.

Does Foremerge use a model to find conflicts?

No. The detector compares declared scopes and operations, so the wording of a plan does not change the result. "Consolidate payments onto Stripe" and "Replace PaymentService with Stripe" reach the same verdict.

How do I connect Foremerge to Claude Code, Codex and Cursor?

Run `foremerge setup all`, or `foremerge setup claude`, `foremerge setup codex` and `foremerge setup cursor` for one client. The command installs the skill and the MCP entry and leaves other settings alone. `foremerge doctor --client all` checks the result.

Discussion

No questions or reviews yet.

CLI tools
Editors’ pick

A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review

PluginExtended access304KRepository stars
Editors’ pick

Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture

SkillMinimal access301.6KRepository stars

Karpathy-inspired Claude Code guidelines

Karpathy-Inspired Claude Code Guidelines

Four principles in one CLAUDE.md against common LLM coding mistakes: silent assumptions, overengineering, drive-by edits

SkillMinimal access222.9KRepository stars

A plugin and skill that makes the agent write minimal code: reuse, stdlib and native platform features come first

PluginExtended access174.3KRepository stars
Editors’ pick

GitHub toolkit for spec-driven development: the specify CLI adds agent commands and skills to a project, from principles to implementation

CLIExtended access142.6KRepository stars

Garry Tan's skill suite that turns Claude Code into a virtual team: product, architecture, design, review, QA and shipping

SkillBroad access137.4KRepository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialRepository starsMain difference
Foremerge (this entry)no521
Weaveno1,331a git merge driver that removes false conflicts after the edits
Worktrunkno9,420the `wt` command for creating and managing git worktrees for parallel agents
Claude Squadno8,656a terminal app that runs several agent sessions

README in short

The core is written in Rust and rests on a local SQLite store, the git CLI and validation runs from a given argv. The repository holds benchmark scenarios in `benchmarks/scenarios`, a recorded session in `examples/terminal-session.txt` and architecture decision records in `docs/adr`.

README badge

Report a problem

Foxx AIForemerge
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.