{"_id":"@elimydlarz/trunk-sync","_rev":"7-1e93134b5d9b3f4fc65b2b52f013d2b4","name":"@elimydlarz/trunk-sync","dist-tags":{"latest":"3.9.4"},"versions":{"3.8.5":{"name":"@elimydlarz/trunk-sync","version":"3.8.5","keywords":["claude-code","multi-agent","git","sync","trunk-based-development"],"license":"MIT","_id":"@elimydlarz/trunk-sync@3.8.5","maintainers":[{"name":"elimydlarz","email":"eli.mydlarz@gmail.com"}],"homepage":"https://github.com/elimydlarz/trunk-sync#readme","bugs":{"url":"https://github.com/elimydlarz/trunk-sync/issues"},"bin":{"trunk-sync":"dist/cli.js"},"dist":{"shasum":"3b778ffbaa3e6b8e55d7422821137c163ba5bf94","tarball":"https://registry.npmjs.org/@elimydlarz/trunk-sync/-/trunk-sync-3.8.5.tgz","fileCount":26,"integrity":"sha512-K1J8ioby9ujBZA4/ZTlqkx4FpXMAQ0+JwrhIEFQy1AFXUWxxDIei1sDyMHtADg++cAsAj7bgc7PRDk16gyj0Jw==","signatures":[{"sig":"MEYCIQCtYBGXzf29sZpG0p8h5Ue0AG391vAuE0Wx4AsehVpgvQIhAOCp0lh/c7diPSbeeH8rWmK1Z3TaKbd0xCiiDnwN87hO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69119},"type":"module","_from":"file:elimydlarz-trunk-sync-3.8.5.tgz","scripts":{"dev":"tsx src/cli.ts","test":"node --test --test-reporter spec 'dist/**/*.test.js'","build":"tsc","version":"node scripts/sync-plugin-version.js && git add .claude-plugin/plugin.json","test:e2e":"bash test/trunk-sync.test.sh","postbuild":"chmod +x dist/cli.js"},"_npmUser":{"name":"elimydlarz","email":"eli.mydlarz@gmail.com"},"_resolved":"/private/var/folders/8l/_8_bm53j3pbb8rf6rzh3l84c0000gn/T/fe3dc4144b75bcf9721c76838c9dc5ff/elimydlarz-trunk-sync-3.8.5.tgz","_integrity":"sha512-K1J8ioby9ujBZA4/ZTlqkx4FpXMAQ0+JwrhIEFQy1AFXUWxxDIei1sDyMHtADg++cAsAj7bgc7PRDk16gyj0Jw==","repository":{"url":"git+https://github.com/elimydlarz/trunk-sync.git","type":"git"},"_npmVersion":"11.6.2","description":"Maximum continuous integration for multi-agent coding — every edit is committed and pushed to trunk immediately","directories":{},"_nodeVersion":"25.2.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4","typescript":"^5","@types/node":"^22"},"_npmOperationalInternal":{"tmp":"tmp/trunk-sync_3.8.5_1779692431955_0.7974657859852139","host":"s3://npm-registry-packages-npm-production"}},"3.8.6":{"name":"@elimydlarz/trunk-sync","version":"3.8.6","keywords":["claude-code","multi-agent","git","sync","trunk-based-development"],"license":"MIT","_id":"@elimydlarz/trunk-sync@3.8.6","maintainers":[{"name":"elimydlarz","email":"eli.mydlarz@gmail.com"}],"homepage":"https://github.com/elimydlarz/trunk-sync#readme","bugs":{"url":"https://github.com/elimydlarz/trunk-sync/issues"},"bin":{"trunk-sync":"dist/cli.js"},"dist":{"shasum":"ff2aef8b8bc18958698d868ab9e9043a9efb04b3","tarball":"https://registry.npmjs.org/@elimydlarz/trunk-sync/-/trunk-sync-3.8.6.tgz","fileCount":26,"integrity":"sha512-R2Kdcj5Hv/Q63ZtDJ2VtWHOuRfpqUCJJpUAfDKizP2zfZtKlWMTTjGo+JKkxQY3mCEJi5jCQ0ssnONoKqLrY3A==","signatures":[{"sig":"MEYCIQD/0jBLQCqs8xj2cjNYCG+WU5xReNileEFfSP3PmjigDQIhAJv8zU6VtdhMEzPD03i0Kz2OD5Y++PatLX1UalQA6qmr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69119},"type":"module","_from":"file:elimydlarz-trunk-sync-3.8.6.tgz","scripts":{"dev":"tsx src/cli.ts","test":"node --test --test-reporter spec 'dist/**/*.test.js'","build":"tsc","version":"node scripts/sync-plugin-version.js && git add .claude-plugin/plugin.json","test:e2e":"bash test/trunk-sync.test.sh","postbuild":"chmod +x dist/cli.js"},"_npmUser":{"name":"elimydlarz","email":"eli.mydlarz@gmail.com"},"_resolved":"/private/var/folders/8l/_8_bm53j3pbb8rf6rzh3l84c0000gn/T/6bf13ec44e515b991124a897c08b5471/elimydlarz-trunk-sync-3.8.6.tgz","_integrity":"sha512-R2Kdcj5Hv/Q63ZtDJ2VtWHOuRfpqUCJJpUAfDKizP2zfZtKlWMTTjGo+JKkxQY3mCEJi5jCQ0ssnONoKqLrY3A==","repository":{"url":"git+https://github.com/elimydlarz/trunk-sync.git","type":"git"},"_npmVersion":"11.6.2","description":"Maximum continuous integration for multi-agent coding — every edit is committed and pushed to trunk immediately","directories":{},"_nodeVersion":"25.2.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4","typescript":"^5","@types/node":"^22"},"_npmOperationalInternal":{"tmp":"tmp/trunk-sync_3.8.6_1779728859383_0.12013125929265267","host":"s3://npm-registry-packages-npm-production"}},"3.9.0":{"name":"@elimydlarz/trunk-sync","version":"3.9.0","keywords":["claude-code","multi-agent","git","sync","trunk-based-development"],"license":"MIT","_id":"@elimydlarz/trunk-sync@3.9.0","maintainers":[{"name":"elimydlarz","email":"eli.mydlarz@gmail.com"}],"homepage":"https://github.com/elimydlarz/trunk-sync#readme","bugs":{"url":"https://github.com/elimydlarz/trunk-sync/issues"},"bin":{"trunk-sync":"dist/cli.js"},"dist":{"shasum":"48be64045e4421dca6a6e62cdd0c18584330464d","tarball":"https://registry.npmjs.org/@elimydlarz/trunk-sync/-/trunk-sync-3.9.0.tgz","fileCount":34,"integrity":"sha512-y+o02tuAvX5PAhUzQvNI4C0ptsXJwm6dBuFmCsbQN57EgJDehajJqYH69XYVMFz20GrZVYb7tq2VDwvht+W86Q==","signatures":[{"sig":"MEUCIQDlpCOPE7Klm54rwhvzq5WFHTZL3Brh2Ddk0vxPAqOThQIge7Q5JgtQozeJNNxfRX0wPt6vE5VeTQo5E4NFp+xd92U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":88206},"type":"module","_from":"file:elimydlarz-trunk-sync-3.9.0.tgz","scripts":{"dev":"tsx src/cli.ts","test":"node --test --test-reporter spec 'dist/**/*.test.js'","build":"tsc","version":"node scripts/sync-plugin-version.js && git add .claude-plugin/plugin.json","test:e2e":"bash test/trunk-sync.test.sh","postbuild":"chmod +x dist/cli.js"},"_npmUser":{"name":"elimydlarz","email":"eli.mydlarz@gmail.com"},"_resolved":"/private/var/folders/8l/_8_bm53j3pbb8rf6rzh3l84c0000gn/T/faab01bd7c28359c3aa09b7dfc2af6f1/elimydlarz-trunk-sync-3.9.0.tgz","_integrity":"sha512-y+o02tuAvX5PAhUzQvNI4C0ptsXJwm6dBuFmCsbQN57EgJDehajJqYH69XYVMFz20GrZVYb7tq2VDwvht+W86Q==","repository":{"url":"git+https://github.com/elimydlarz/trunk-sync.git","type":"git"},"_npmVersion":"11.6.2","description":"Maximum continuous integration for multi-agent coding — every edit is committed and pushed to trunk immediately","directories":{},"_nodeVersion":"25.2.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4","typescript":"^5","@types/node":"^22"},"_npmOperationalInternal":{"tmp":"tmp/trunk-sync_3.9.0_1782973338338_0.5017680886691618","host":"s3://npm-registry-packages-npm-production"}},"3.9.1":{"name":"@elimydlarz/trunk-sync","version":"3.9.1","keywords":["claude-code","multi-agent","git","sync","trunk-based-development"],"license":"MIT","_id":"@elimydlarz/trunk-sync@3.9.1","maintainers":[{"name":"elimydlarz","email":"eli.mydlarz@gmail.com"}],"homepage":"https://github.com/elimydlarz/trunk-sync#readme","bugs":{"url":"https://github.com/elimydlarz/trunk-sync/issues"},"bin":{"trunk-sync":"dist/cli.js"},"dist":{"shasum":"fb01664400e0fa0398dac90f680794d50edef7a9","tarball":"https://registry.npmjs.org/@elimydlarz/trunk-sync/-/trunk-sync-3.9.1.tgz","fileCount":34,"integrity":"sha512-F/UsqkxTlBjaa44cM2DhsB9vGKR45Hbk+p0PtOWrsNRg2BQVM1tCSQs8G2RtDm+sS9Y9uK73s0cliR4+WNDOTQ==","signatures":[{"sig":"MEUCIQDOIFBg9jcNmatWC7Td1JRpFrwTTMSIH+SGuN2P3dZJvAIgMdWqnDvRUCWzBqhqUSnqyfzxaZXSK6wPc+rF4Kq6ZVY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":88487},"type":"module","_from":"file:elimydlarz-trunk-sync-3.9.1.tgz","scripts":{"dev":"tsx src/cli.ts","test":"node --test --test-reporter spec 'dist/**/*.test.js'","build":"tsc","version":"node scripts/sync-plugin-version.js && git add .claude-plugin/plugin.json","test:e2e":"bash test/trunk-sync.test.sh","postbuild":"chmod +x dist/cli.js"},"_npmUser":{"name":"elimydlarz","email":"eli.mydlarz@gmail.com"},"_resolved":"/private/var/folders/8l/_8_bm53j3pbb8rf6rzh3l84c0000gn/T/ec410cc32c0873b8ab8c792619c9775f/elimydlarz-trunk-sync-3.9.1.tgz","_integrity":"sha512-F/UsqkxTlBjaa44cM2DhsB9vGKR45Hbk+p0PtOWrsNRg2BQVM1tCSQs8G2RtDm+sS9Y9uK73s0cliR4+WNDOTQ==","repository":{"url":"git+https://github.com/elimydlarz/trunk-sync.git","type":"git"},"_npmVersion":"11.6.2","description":"Maximum continuous integration for multi-agent coding — every edit is committed and pushed to trunk immediately","directories":{},"_nodeVersion":"25.2.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4","typescript":"^5","@types/node":"^22"},"_npmOperationalInternal":{"tmp":"tmp/trunk-sync_3.9.1_1782979748066_0.6873946730178377","host":"s3://npm-registry-packages-npm-production"}},"3.9.2":{"name":"@elimydlarz/trunk-sync","version":"3.9.2","keywords":["claude-code","multi-agent","git","sync","trunk-based-development"],"license":"MIT","_id":"@elimydlarz/trunk-sync@3.9.2","maintainers":[{"name":"elimydlarz","email":"eli.mydlarz@gmail.com"}],"homepage":"https://github.com/elimydlarz/trunk-sync#readme","bugs":{"url":"https://github.com/elimydlarz/trunk-sync/issues"},"bin":{"trunk-sync":"dist/cli.js"},"dist":{"shasum":"6bb76d682472b4d172a0b50cb30d9e50e3469743","tarball":"https://registry.npmjs.org/@elimydlarz/trunk-sync/-/trunk-sync-3.9.2.tgz","fileCount":34,"integrity":"sha512-0klaUEzd5O26LZWKGtX1Hl+6gOrkz/UgoUNv+YtErK2+bsyjjPScxM7WP5E2xjgOHFangIgMcceB6wgCRTBtpQ==","signatures":[{"sig":"MEQCIDhcLKBU7C9pcYfOBE02gbjGcwnIVTIIEyVNwY8JBbTAAiBkEO80E4UmbWXzUH31FC4Gv+ouGuhxPe9UN8MsD+uIYA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":88467},"type":"module","_from":"file:elimydlarz-trunk-sync-3.9.2.tgz","scripts":{"dev":"tsx src/cli.ts","test":"node --test --test-reporter spec 'dist/**/*.test.js'","build":"tsc","version":"node scripts/sync-plugin-version.js && git add .claude-plugin/plugin.json","test:e2e":"bash test/trunk-sync.test.sh","postbuild":"chmod +x dist/cli.js"},"_npmUser":{"name":"elimydlarz","email":"eli.mydlarz@gmail.com"},"_resolved":"/private/var/folders/8l/_8_bm53j3pbb8rf6rzh3l84c0000gn/T/5721a2663d5a36f222a29ff7394af8c7/elimydlarz-trunk-sync-3.9.2.tgz","_integrity":"sha512-0klaUEzd5O26LZWKGtX1Hl+6gOrkz/UgoUNv+YtErK2+bsyjjPScxM7WP5E2xjgOHFangIgMcceB6wgCRTBtpQ==","repository":{"url":"git+https://github.com/elimydlarz/trunk-sync.git","type":"git"},"_npmVersion":"11.6.2","description":"Maximum continuous integration for multi-agent coding — every edit is committed and pushed to trunk immediately","directories":{},"_nodeVersion":"25.2.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4","typescript":"^5","@types/node":"^22"},"_npmOperationalInternal":{"tmp":"tmp/trunk-sync_3.9.2_1782990896914_0.9093431882469758","host":"s3://npm-registry-packages-npm-production"}},"3.9.3":{"name":"@elimydlarz/trunk-sync","version":"3.9.3","keywords":["claude-code","multi-agent","git","sync","trunk-based-development"],"license":"MIT","_id":"@elimydlarz/trunk-sync@3.9.3","maintainers":[{"name":"elimydlarz","email":"eli.mydlarz@gmail.com"}],"homepage":"https://github.com/elimydlarz/trunk-sync#readme","bugs":{"url":"https://github.com/elimydlarz/trunk-sync/issues"},"bin":{"trunk-sync":"dist/cli.js"},"dist":{"shasum":"a3a5eac92055623ae4ef41cf190bc4385c6c1fef","tarball":"https://registry.npmjs.org/@elimydlarz/trunk-sync/-/trunk-sync-3.9.3.tgz","fileCount":34,"integrity":"sha512-zEO05QBKIkVtpk0DsQ9Ke8ITwSR5dBRADfiDm16SKMkxszDnuM2C6eRRd3LuIahVG8OkSApF0mnf07RptZCJgQ==","signatures":[{"sig":"MEYCIQCRv+8is4eVbrdsKGDng3AymVhNWCwLT4RfOLheFXKPSgIhAIDm962DoWDX80tPuQwpQB0FPp19swqiig9aEO+umFwl","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":89303},"type":"module","_from":"file:elimydlarz-trunk-sync-3.9.3.tgz","scripts":{"dev":"tsx src/cli.ts","test":"node --test --test-reporter spec 'dist/**/*.test.js'","build":"tsc","version":"node scripts/sync-plugin-version.js && git add .claude-plugin/plugin.json","test:e2e":"bash test/trunk-sync.test.sh","postbuild":"chmod +x dist/cli.js"},"_npmUser":{"name":"elimydlarz","email":"eli.mydlarz@gmail.com"},"_resolved":"/private/var/folders/8l/_8_bm53j3pbb8rf6rzh3l84c0000gn/T/fba22934fe6e4364a5d107598d27b13b/elimydlarz-trunk-sync-3.9.3.tgz","_integrity":"sha512-zEO05QBKIkVtpk0DsQ9Ke8ITwSR5dBRADfiDm16SKMkxszDnuM2C6eRRd3LuIahVG8OkSApF0mnf07RptZCJgQ==","repository":{"url":"git+https://github.com/elimydlarz/trunk-sync.git","type":"git"},"_npmVersion":"11.6.2","description":"Maximum continuous integration for multi-agent coding — every edit is committed and pushed to trunk immediately","directories":{},"_nodeVersion":"25.2.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4","typescript":"^5","@types/node":"^22"},"_npmOperationalInternal":{"tmp":"tmp/trunk-sync_3.9.3_1783248206497_0.5839462966435434","host":"s3://npm-registry-packages-npm-production"}},"3.9.4":{"name":"@elimydlarz/trunk-sync","version":"3.9.4","type":"module","publishConfig":{"access":"public"},"description":"Maximum continuous integration for multi-agent coding — every edit is committed and pushed to trunk immediately","bin":{"trunk-sync":"dist/cli.js"},"devDependencies":{"@types/node":"^22","tsx":"^4","typescript":"^5"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/elimydlarz/trunk-sync.git"},"keywords":["claude-code","multi-agent","git","sync","trunk-based-development"],"dependencies":{},"scripts":{"build":"tsc","postbuild":"chmod +x dist/cli.js","dev":"tsx src/cli.ts","test":"node --test --test-reporter spec 'dist/**/*.test.js'","test:e2e":"bash test/trunk-sync.test.sh","version":"node scripts/sync-plugin-version.js && git add .claude-plugin/plugin.json"},"_id":"@elimydlarz/trunk-sync@3.9.4","bugs":{"url":"https://github.com/elimydlarz/trunk-sync/issues"},"homepage":"https://github.com/elimydlarz/trunk-sync#readme","_integrity":"sha512-LpPOy+vYpVTZOYKwJ1pqYYqiisJI0dLZk2My87ZW1OcaiSsFk/nyaZcZiXJIfwAAH/gpfN4hX22quXpgbDzbpg==","_resolved":"/private/var/folders/8l/_8_bm53j3pbb8rf6rzh3l84c0000gn/T/2e5f9c8917b8533c29f13929814c47f4/elimydlarz-trunk-sync-3.9.4.tgz","_from":"file:elimydlarz-trunk-sync-3.9.4.tgz","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-LpPOy+vYpVTZOYKwJ1pqYYqiisJI0dLZk2My87ZW1OcaiSsFk/nyaZcZiXJIfwAAH/gpfN4hX22quXpgbDzbpg==","shasum":"7a6e3ca981d63c88be21ae19dddc88adc14bbe5c","tarball":"https://registry.npmjs.org/@elimydlarz/trunk-sync/-/trunk-sync-3.9.4.tgz","fileCount":34,"unpackedSize":89303,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHvPkWoVP4Hgjeh/r66bRbdBTXcgW9Xdjp94CjsQikFvAiEAuuR3p90cC/dYDDQbJM9IPeRsX1jQxKbWCQyZgRhks4U="}]},"_npmUser":{"name":"elimydlarz","email":"eli.mydlarz@gmail.com"},"directories":{},"maintainers":[{"name":"elimydlarz","email":"eli.mydlarz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/trunk-sync_3.9.4_1783249282785_0.31589930847196435"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-25T07:00:31.777Z","modified":"2026-07-05T11:01:23.045Z","3.8.5":"2026-05-25T07:00:32.125Z","3.8.6":"2026-05-25T17:07:39.540Z","3.9.0":"2026-07-02T06:22:18.474Z","3.9.1":"2026-07-02T08:09:08.223Z","3.9.2":"2026-07-02T11:14:57.047Z","3.9.3":"2026-07-05T10:43:26.643Z","3.9.4":"2026-07-05T11:01:22.946Z"},"bugs":{"url":"https://github.com/elimydlarz/trunk-sync/issues"},"license":"MIT","homepage":"https://github.com/elimydlarz/trunk-sync#readme","keywords":["claude-code","multi-agent","git","sync","trunk-based-development"],"repository":{"type":"git","url":"git+https://github.com/elimydlarz/trunk-sync.git"},"description":"Maximum continuous integration for multi-agent coding — every edit is committed and pushed to trunk immediately","maintainers":[{"name":"elimydlarz","email":"eli.mydlarz@gmail.com"}],"readme":"# trunk-sync\n\nA distributed file system for multi-agent software engineering, built on Git.\n\nMany Claude Code agents can work in the same repo at once — on worktrees, across remote machines, on [OpenClaw](https://openclaw.com), any mix. Everything stays in sync, agents work around each other, nothing gets left behind, and there's nothing manual to do. If you're confused about some code an agent wrote, you can summon its author with Seance.\n\nTwo pieces: a **Claude Code / Codex CLI hook** that turns Git into continuous integration for agents, and a **CLI** with install, config, and seance commands.\n\n## Install\n\n```bash\nnpm install -g @elimydlarz/trunk-sync\ntrunk-sync install                  # Claude Code, project scope\ntrunk-sync install --scope user     # Claude Code, all repos\ntrunk-sync install --client codex   # OpenAI Codex CLI\n```\n\nThat's it. Every file edit is now committed and pushed automatically.\n\nThe Codex install writes an entry to `~/.agents/plugins/marketplace.json`; finish in Codex with `/plugins install trunk-sync`.\n\n**Prerequisites:** [Claude Code](https://docs.anthropic.com/en/docs/claude-code) or [Codex CLI](https://developers.openai.com/codex), `jq`, a git repo with a remote (`origin`).\n\n## How it works\n\nAfter every `Edit` or `Write`, the hook fires: stage, commit, pull, push. Works on main, on branches, in worktrees. No git commands to remember, no manual merging, no work left behind on a branch nobody pushed.\n\nFor multi-agent work, launch each agent in its own worktree:\n\n```bash\nclaude -w    # each invocation gets its own worktree\n```\n\nIf two agents edit the same file, trunk-sync surfaces the conflict as feedback. The agent resolves it by editing the file — then the hook completes the merge and pushes. No human intervention.\n\nBy default, agents sync to a dedicated `agents` branch, not directly to your repo's actual default branch — see [Configuration](#configuration).\n\n## Configuration\n\nConfig lives at `.trunk-sync/config` in the repo — committed and synced like timecards and transcripts, so every machine and agent working on the repo sees the same settings. It's not a personal dotfile: set a key once and it applies everywhere the repo is worked on.\n\n```bash\ntrunk-sync config                        # show all config\ntrunk-sync config <key>                  # get a value\ntrunk-sync config <key>=<value>          # set a value\ntrunk-sync config --unset <key>          # remove a key\n```\n\n`trunk-sync config` with no arguments always prints every key below — explicit value if you've set it, built-in default otherwise — so it's the fastest way to see what's configurable without leaving the terminal:\n\n```\n$ trunk-sync config\ncommit-transcripts=true\ntarget-branch=agents\n```\n\nSetting or unsetting a key commits the change immediately, and pushes it (best-effort) if a remote is configured — this is a manual command, not something that rides along with the next edit. Run outside a git repo, it runs `git init` first, so there's always a repo to store config in.\n\n### Keys\n\n- **`target-branch`** (default `agents`) — the branch trunk-sync syncs to. Agents commit and push here by default instead of your repo's actual default branch, so every edit's auto-commit doesn't land directly on `main` (or whatever it's called) — merging agent work in stays a deliberate step. Point it anywhere:\n  ```bash\n  trunk-sync config target-branch=main     # sync directly to main instead\n  ```\n- **`commit-transcripts`** (default `true`) — snapshot the session transcript into every commit. See [Transcript commits](#transcript-commits) below.\n\n## Clocking In — agents that know about each other\n\nAgents are automatically aware of each other. On every commit, the hook writes a timecard recording the agent's branch and current task (extracted from the conversation). Timecards are committed and pushed alongside code, so agents on different machines see each other too.\n\nWhen another agent is working in the same repo:\n\n```\nTRUNK-SYNC ACTIVE: 1 other agent active. Continue your work as planned — no action required.\n- abc12345 on dev-macbook (branch: main, 30s ago) — \"Fix the login bug\"\nIf you share resources (ports, test databases, build locks), coordinate accordingly. Otherwise, ignore this message.\n```\n\nAn agent counts as active while its heartbeat is fresh — bumped on every edit, and at each turn's end by a Stop hook. After an hour of silence its card reads as stale (possibly disrupted); abandoned cards are reaped only after 14 days. There are no process IDs to check and no clock-out command — liveness is purely the age of the last heartbeat. The message is throttled to avoid noise.\n\nOn its **first** edit of a session, an agent is also nudged to run the test suite:\n\n```\nTRUNK-SYNC WIP: Run the test suite before starting. Failing tests are the authoritative signal of\nunfinished work — any failing test not owned by a currently-active agent is WIP for you to resume.\nThe active roster above is advisory context for who already holds work.\n```\n\nFailing tests — not the timecard — are the authoritative signal of unfinished work. Cross-referencing them against who is still active tells a fresh agent which unfinished work is orphaned and safe to pick up; the cards are advisory context.\n\n## Handover — continue across sessions and context limits\n\nWhen a session is running low on context, it can hand off to the next one. At session start the hook gives the agent its own session id and shows it how to record progress:\n\n```bash\ntrunk-sync progress <session-id> --last \"implemented the parser\" --next \"wire the CLI and write tests\"\n```\n\nThat last step and remaining steps are written into the agent's timecard and committed/pushed like any other. When the next session starts — yours after a fresh start, or another agent's, on any machine — its SessionStart surfaces the handover:\n\n```\nTRUNK-SYNC HANDOVER: 1 other session has work in progress. Failing tests on the trunk are the\nauthoritative signal of what is unfinished; the cards below are advisory context.\n- 43605dd6 on dev-macbook (branch: main, 3h ago) — stale, possibly disrupted: verify against the test suite before resuming — it may already be done\n    task: Add agent-authored progress to trunk-sync\n    last: implemented the parser\n    next: wire the CLI and write tests\nEach session's full record is in its committed transcript (.transcripts/); resume it with seance.\n```\n\nSo you can stop a session that's low on context — or one that crashes mid-task — and pick the work up in a fresh one without re-explaining where you were. Because liveness is a heartbeat rather than a live process, a disrupted session's work is surfaced as a resumable handover instead of being lost; abandoned cards are reaped only after 14 days, and the committed transcript remains the durable record regardless.\n\n## Seance — summon the author of any line of code\n\nPoint at any line, and seance rewinds the codebase and the agent's session back to the exact moment that line was written. Ask the agent what it was thinking, why it made that choice, what it considered and rejected. Works for both Claude and Codex commits — seance reads the commit body's `Agent:` field and forks the matching CLI.\n\n```bash\n# Rewind and resume the session that wrote line 42\ntrunk-sync seance src/main.ts:42\n\n# Just show which session wrote it, without launching the CLI\ntrunk-sync seance src/main.ts:42 --inspect\n\n# List all trunk-sync sessions in the repo\ntrunk-sync seance --list\n```\n\nUnder the hood: `git blame` → commit → session ID + agent → transcript rewind → checkout at that commit → resume the original CLI with the same context it had. Read-only: Claude is launched with `--allowedTools Read` + plan mode; Codex is launched with `--sandbox read-only --ask-for-approval never`. The resumed agent explains and explores but cannot edit.\n\n### Transcript commits\n\nBy default, each auto-commit includes a snapshot of the session transcript, so seance can find it directly in the commit via `git diff-tree` regardless of which machine wrote the code — across machines, CI, and cleaned-up sessions. This is on by default because seance and cross-session handover are most useful when the record is always there.\n\n**Security note:** Transcripts contain your full conversation with Claude, committed to git in the clear. On repos where you don't want that visibility, opt out — repo-wide, for every machine and agent working on it:\n\n```bash\ntrunk-sync config commit-transcripts=false\n```\n\nWith the opt-out set, seance falls back to transcripts on the local filesystem — which works for code written on the same machine, but not for code from other machines, CI, or cleaned-up sessions.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}