Git hooks that detect AI tool usage and associate supported session file paths with commits. Detection runs locally; an optional API token enables attribution uploads.
brew install usetempo/tap/tempo-cliSupported platforms: macOS and Linux (Intel & ARM)
Example commands and output. Detection results depend on the local sessions and committed files.
# Optional: configure attribution uploads $ 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: dev@example.com Repo: example/repo ๐ข 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 # Attribution runs automatically after each commit.
Extracts file paths from Claude Code and Codex JSONL, Copilot Agent JSON, Cursor SQLite sessions, and Aider history, then intersects them with committed files.
Checks for running Claude Code, Cursor, Copilot, Codex, or Aider processes on macOS and Linux when no file match exists for that tool. A running process does not prove that it changed the commit.
Checks supported Co-Authored-By trailers and Aider commit-message patterns when no stronger signal exists for that tool.
| Tool | File matching | Process detection | Git trailers |
|---|---|---|---|
| Claude Code | โ | โ | โ |
| Cursor | โ | โ | โ |
| GitHub Copilot | โ | โ | โ |
| Codex | โ | โ | โ |
| Aider | โ | โ | โ |
Cursor file matching requires the sqlite3 command. These detectors read supported local session formats; a tool being installed does not guarantee a file match.
| 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/. The payload contains attribution metadata, excluding source code, diffs, prompts, and conversation transcripts. Example:
{
"commit_sha": "a1b2c3d",
"commit_author": "dev@example.com",
"repo": "example/repo",
"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 parses supported session files locally. When an API token is configured, it uploads the attribution metadata shown above. Entire Checkpoints is a separate integration with different stored session data.
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) |