Lightweight git hooks that detect AI tool usage per commit with file-level attribution. No source code ever leaves your machine.
brew install usetempo/tap/tempo-cliSupported platforms: macOS and Linux (Intel & ARM)
# Optional: connect to Tempo cloud for team dashboards $ tempo-cli auth <your-token> # Install hooks in your repo $ cd /path/to/your/repo $ tempo-cli enable ✓ post-commit hook installed ✓ pre-push hook installed # Verify detection works $ tempo-cli test Commit: a1b2c3d Author: jose@tempo.dev Repo: tempo-metrics/tempo 🟢 claude-code (high confidence, file-match) Files: 2/5 committed files matched - src/auth.ts - src/auth.test.ts Model: claude-opus-4-6 Tokens: 24,500 Session: 14m0s # That's it — attribution runs automatically on every commit.
Parses local AI tool session data (Claude Code JSONL, Codex JSONL, Copilot Agent JSON) to identify exactly which files the AI wrote, then intersects with your committed files.
Checks if AI tool processes (Cursor, Copilot, etc.) are running at commit time.
Parses Co-Authored-By trailers in commit messages to identify AI tool involvement.
| Tool | File matching | Process detection | Git trailers |
|---|---|---|---|
| Claude Code | ✓ | ✓ | ✓ |
| Cursor | — | ✓ | ✓ |
| GitHub Copilot | ✓ | ✓ | ✓ |
| Codex | ✓ | ✓ | — |
| Windsurf | — | ✓ | ✓ |
| Command | Description |
|---|---|
tempo-cli enable | Install post-commit and pre-push hooks |
tempo-cli disable | Remove Tempo hooks (preserves other hooks) |
tempo-cli auth <token> | Save API token for Tempo cloud |
tempo-cli status | Show hooks, pending records, and config |
tempo-cli test | Dry-run detection against the last commit |
tempo-cli test --json | Same as above, but output raw JSON |
Each detection produces a JSON file in .tempo/pending/. No source code, diffs, prompts, or conversation transcripts are ever included — only metadata:
{
"commit_sha": "a1b2c3d",
"commit_author": "jose@tempo.dev",
"repo": "tempo-metrics/tempo",
"timestamp": "2026-02-12T17:08:00Z",
"detections": [
{
"tool": "claude-code",
"confidence": "high",
"method": "file-match",
"files_matched": ["src/auth.ts", "src/auth.test.ts"],
"files_committed": 5,
"ai_files": 2,
"model": "claude-opus-4-6",
"token_usage": 24500,
"session_duration_sec": 840
}
]
}Tempo CLI runs entirely locally. The only data that leaves your machine (if you configure an API token) is the attribution metadata shown above.
Only if API token configured
Without an API token, everything works the same — detection runs, JSON files are saved locally, nothing is sent to the cloud. You can inspect results anytime:
$ cat .tempo/pending/*.json | jq '.detections[].tool' "claude-code" "claude-code" "copilot"
Config file location: ~/.tempo/config.json
{
"api_token": "tmp_...",
"api_endpoint": "https://api.usetempo.dev",
"session_max_age_hours": 72
}| Variable | Description |
|---|---|
TEMPO_API_ENDPOINT | Override the API endpoint |
TEMPO_SESSION_MAX_AGE | Session recency window in hours (default: 72) |