Skip to main content

Agent setup templates

Three agents install git-byline as a package. The rest have no package manager, so this directory carries the two files they need, ready to copy.

Agents with a package​

AgentInstall
Factorydroid plugin marketplace add comarch/git-byline then /git-byline-setup
Claude Code/plugin marketplace add comarch/git-byline then /git-byline-setup
Gemini CLIgemini extensions install https://github.com/comarch/git-byline then /git-byline-setup

Factory and Claude Code both load ../git-byline: one plugin directory with a manifest per agent and shared commands/ and skills/. Gemini CLI reads gemini-extension.json and commands/git-byline-setup.toml from the repository root, because that is where it installs an extension from.

Agents you set up by copying​

Copy the setup command so the agent gains /git-byline-setup, then run it. The command installs the verified binary, installs the Git hooks, and copies the hook file below. Copying the hook file by hand works too.

AgentSetup commandCopy it toHook fileCopy it to
GitHub Copilotcopilot/git-byline-setup.prompt.md.github/prompts/copilot/hooks.json.github/hooks/promptscript.json
VS Code Agentvscode/git-byline-setup.prompt.md.github/prompts/vscode/hooks.json.github/hooks/promptscript-vscode.json
Cursorcursor/git-byline-setup.md.cursor/commands/cursor/hooks.json.cursor/hooks.json
Codexcodex/git-byline-setup.md~/.codex/prompts/codex/hooks.json.codex/hooks.json
Windsurfwindsurf/git-byline-setup.md.windsurf/workflows/windsurf/hooks.json.windsurf/hooks.json
Grokgrok/git-byline-setup.mdthe prompt directory your build readsgrok/hooks.json.grok/hooks/promptscript.json
OpenCodeopencode/git-byline-setup.md.opencode/commands/opencode/promptscript.ts.opencode/plugins/promptscript.ts
Gemini CLI, without the extensionnone, use the extension abovegemini/settings.jsonmerge into .gemini/settings.json

.gemini/settings.json and .claude/settings.json hold unrelated settings too, so merge the hooks block instead of replacing the file. Every other hook file in this table is complete and can be copied as is.

OpenCode's plugin is documented for Linux, macOS, and WSL. Its setup command lists the native Windows PowerShell steps as unverified, and install.ps1 does not detect OpenCode. Because OpenCode loads the plugin as code, that setup command downloads it from a release tag and checks its SHA-256 before it moves the file into .opencode/plugins.

Why these files are safe to copy​

Each hook file is byte-identical to the one this repository generates for itself, and go run ./tools/validate fails when they drift apart. The shell hook bodies contain no absolute path: they resolve the project root with git rev-parse --show-toplevel and find git-byline through PATH. The OpenCode plugin uses its plugin context to resolve the project root.

Each hook calls git-byline checkpoint portable-<agent> --hook-input stdin, which records a snapshot before and after an edit. OpenCode's generated plugin also observes apply_patch and Bash calls, and waits for each checkpoint before OpenCode continues. Without the agent hook, git-byline still annotates commits, but agent edits arrive as plain human lines instead of ai lines, because nothing observed them.

Git hooks​

The Git side is the same for every agent and needs no template:

git byline install-hooks --agent none --git --project

Add --local-notes to keep attribution notes off ordinary pushes.