Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By elimydlarzv5.0.1MITIn 1 marketplace
Keeps parallel Claude Code or Codex agents on separate clones converging on one branch by committing and pushing every edit. Hooks run on their own: after each edit they commit and push when origin exists, and they reject direct write-side git commands.
Trending plugins
7-day copy clicks
Run automatically on Claude Code events. Claude doesn't decide.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
multi-agent, continuous-integration, trunk-based-development, git-sync, auto-commit, git-hooks, hooks, git ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A distributed file system for multi-agent software engineering, built on Git.
Many Claude Code and Codex agents can work on the same branch at once from independent clones, including across remote machines. Their commits converge through the branch they share.
trunk-sync is a Claude Code / Codex CLI hook that turns Git into continuous integration for agents.
Install the plugin with your agent's plugin manager:
claude plugin marketplace add elimydlarz/claude-code-plugins
claude plugin install trunk-sync@elimydlarz
Or with Codex CLI:
codex plugin marketplace add elimydlarz/claude-code-plugins
codex plugin add trunk-sync@elimydlarz
Once the plugin is installed, repository changes made through the hooked agent tools are committed automatically and pushed when origin is configured.
Prerequisites: Claude Code or Codex CLI, and a Git repository with author name and email configured. An origin remote is optional; without one, trunk-sync commits locally.
trunk-sync has no required configuration file. It acts on the repository containing the tool event, synchronizes the currently checked-out branch with the same-named branch at origin, and commits locally when origin is absent. Configure Git's user.name, user.email, credentials, and origin as you would for normal command-line use. Keep a branch checked out: detached HEAD cannot provide a branch for presence or remote synchronization.
After every Edit, Write, Bash, apply_patch, or local_shell use, the hook stages eligible repository changes and commits them. Path-aware tool events stage the reported path. Events without a path, including shell commands and Codex patches, stage all detected modified, deleted, and untracked repository paths. Ignored files, files outside the repository, and tool uses that leave no changes are skipped.
With origin configured, trunk-sync pulls and pushes the checked-out branch after each commit. If a push is rejected, it pulls and retries once. Conflicts and other remote failures are returned to the agent as actionable hook feedback.
Agents can still inspect Git with standalone commands such as git status, git log, git show, git diff, git blame, and read-only branch, tag, remote, worktree, stash, reflog, and config queries. Shell composition around Git, including cd repo && git status, is rejected; use a standalone form such as git -C repo status. Direct write-side Git commands are rejected so the hook remains the sync owner.
For multi-agent work, give each agent an independent clone checked out to the same branch:
git clone <repository> agent-a
git clone <repository> agent-b
cd agent-a && git checkout <branch> && claude
Across independent clones, if two agents edit the same file, trunk-sync surfaces the Git conflict as feedback. The agent resolves it by editing the file — then the hook completes the merge and pushes. No human intervention.
Every agent synchronizes the branch it has checked out. Agents in independent clones converge through the same-named remote branch.
Independent clones isolate in-progress files, the Git index, and merge state while converging through the same remote branch.
Linked worktrees remain branch-distinct checkouts. Git normally rejects checking out one branch in multiple linked worktrees; overriding that protection with git worktree add --force leaves separate indexes behind one moving branch ref. Use independent clones for same-branch collaboration.
Session lifecycle commits are isolated: clock-in and clock-out commit only the current session's timecard, while unrelated staged and unstaged changes retain their existing state.
Outside a Git repository, clock-in, synchronization, and clock-out exit without acting. The command guard still rejects write-side git commands in that session.
Agents receive presence through the branch content they synchronize. On session start, the hook writes a presence-only timecard recording the agent's session, host, branch, clock-in time, and heartbeat. Timecards are committed locally and trunk-sync attempts to push them with that branch. On each later committed edit, the hook refreshes that card's lastActiveAt timestamp alongside the code change.
When another agent is working on the same branch:
TRUNK-SYNC ACTIVE: 1 other agent active. Continue your work as planned — no action required.
- abc12345 on dev-macbook (branch: main, 30s ago)
If you share resources (ports, test databases, build locks), coordinate accordingly. Otherwise, ignore this message.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub elimydlarz/claude-code-plugins --plugin trunk-syncPlugins from other owners that cover similar ground