Weave is a Git merge driver that merges functions and classes instead of raw lines. It targets false conflicts when independent edits land in the same file, including multi-agent workflows.
Overview
Weave replaces line-based three-way merge with entity-level merge for supported files. It parses base, ours, and theirs with tree-sitter, matches functions, classes, and similar units by identity, and merges at that granularity so unrelated edits in one file often resolve without manual conflict markers.
When both sides change the same entity incompatibly, or one side deletes what the other modifies, Weave still reports a conflict but labels the entity involved. CLI commands cover setup, explaining conflicts, and checking resolutions after edits. Configuration can be per repository or global via git attributes generated from Weave’s language registry.
Dozens of programming languages and structured formats are supported, with a line-level fallback where no grammar applies. The tool ships as two binaries: weave for user commands and weave-driver for Git invocation during merges. An optional MCP server exposes weave commands to coding agents, and a separate CRDT coordination layer exists for live multi-agent editing before changes reach Git.
Install paths include package managers such as Homebrew and building from Rust sources. After weave setup in a repository, ordinary git merge uses the driver for claimed file types.
Key features
- Tree-sitter entity-level three-way merge
- Git merge-driver integration
- Conflict context by function or class
- explain and check CLI helpers
- Global or per-repo setup
- Wide multi-language format support
- Optional MCP server for agents
- Falls back to line merge when needed
Use cases
- Merging parallel AI agent edits
- Reducing false Git merge conflicts
- Multi-developer edits in one file
- Agent-driven merge workflows via MCP