Installation
Prerequisites
- Git (2.25 or later)
- jq - JSON processor used by capture hook
- macOS:
brew install jq - Linux:
apt install jqordnf install jq
- macOS:
- Claude Code - For automatic AI attribution capture
Quick Install (Recommended)
macOS / Linux:
curl -sSL https://github.com/dotsetlabs/whogitit/releases/latest/download/install.sh | sh
Windows (PowerShell):
irm https://github.com/dotsetlabs/whogitit/releases/latest/download/install.ps1 | iex
This downloads the latest pre-built binary and installs it to ~/.cargo/bin.
Install via Cargo
If you have Rust installed:
cargo install whogitit
Install from Source
For development or to build from the latest code:
Prerequisites: Rust 1.70 or later
# Clone the repository
git clone https://github.com/dotsetlabs/whogitit
cd whogitit
# Install to ~/.cargo/bin
cargo install --path .
Verify Installation
whogitit --version
You should see output like:
whogitit 0.2.0
Quick Setup (Recommended)
The easiest way to set up whogitit is with the automated setup command:
1. Run global setup (once)
whogitit setup
This automatically:
- Installs the capture hook script to
~/.claude/hooks/ - Configures Claude Code’s
~/.claude/settings.jsonwith required hooks - Creates a backup of your existing settings
Note: After running
whogitit setup, you must also runwhogitit initin each repository where you want to track AI attribution. The global hooks only activate for initialized repositories.
2. Initialize your repository
cd your-project
whogitit init
This installs git hooks for the repository:
post-commit- Attaches attribution data to commitspre-push- Automatically pushes git notes with your codepost-rewrite- Preserves notes during rebase and amend
3. Verify setup
whogitit doctor
This checks all configuration and shows any issues:
[OK] whogitit binary: Installed and running
[OK] Capture hook: Installed at ~/.claude/hooks/whogitit-capture.sh
[OK] Hook permissions: Executable
[OK] Claude Code settings: Hooks configured
[OK] Required tools (jq): Available
[OK] Repository hooks: Initialized in current repo
All checks passed! whogitit is properly configured.
Manual Setup (Alternative)
If you prefer manual configuration or need to customize the setup:
1. Copy the hook script
mkdir -p ~/.claude/hooks
cp hooks/whogitit-capture.sh ~/.claude/hooks/
chmod +x ~/.claude/hooks/whogitit-capture.sh
2. Configure Claude Code
Add the following to ~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit|Write|Bash",
"hooks": [
{
"type": "command",
"command": "WHOGITIT_HOOK_PHASE=pre ~/.claude/hooks/whogitit-capture.sh"
}
]
}
],
"PostToolUse": [
{
"matcher": "Edit|Write|Bash",
"hooks": [
{
"type": "command",
"command": "WHOGITIT_HOOK_PHASE=post ~/.claude/hooks/whogitit-capture.sh"
}
]
}
]
}
}
Note: The hook captures Edit, Write, and Bash tool uses. Bash commands that modify files (like
sed,echo >, etc.) are also tracked.
3. Initialize a Repository
In each repository where you want to track AI attribution:
cd your-project
whogitit init
Verify Setup
After setup, you can verify everything is working:
# Run the doctor command for comprehensive checks
whogitit doctor
# Or check manually:
# Check that hooks are installed
ls -la .git/hooks/post-commit .git/hooks/pre-push
# Check git notes configuration
git config --get-all remote.origin.fetch | grep whogitit
Next Steps
- Continue to Quick Start to see whogitit in action
- Learn about Core Concepts to understand how attribution works