AI detection that runs on your machine

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-cli

Supported platforms: macOS and Linux (Intel & ARM)

Quick start

# 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.

How it works

Session file matching

High

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.

Process detection

Medium

Checks if AI tool processes (Cursor, Copilot, etc.) are running at commit time.

Git trailers

Medium

Parses Co-Authored-By trailers in commit messages to identify AI tool involvement.

Supported tools

ToolFile matchingProcess detectionGit trailers
Claude Code
Cursor
GitHub Copilot
Codex
Windsurf

Commands

CommandDescription
tempo-cli enableInstall post-commit and pre-push hooks
tempo-cli disableRemove Tempo hooks (preserves other hooks)
tempo-cli auth <token>Save API token for Tempo cloud
tempo-cli statusShow hooks, pending records, and config
tempo-cli testDry-run detection against the last commit
tempo-cli test --jsonSame as above, but output raw JSON

Attribution payload

Each detection produces a JSON file in .tempo/pending/. No source code, diffs, prompts, or conversation transcripts are ever included — only metadata:

.tempo/pending/a1b2c3d.json
{
  "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
    }
  ]
}

Privacy

Tempo CLI runs entirely locally. The only data that leaves your machine (if you configure an API token) is the attribution metadata shown above.

What Tempo CLI never collects

Source code or file contents
Diffs or patches
AI prompts or conversations
Personal information beyond git email

What Tempo CLI does send

Only if API token configured

Commit SHA and timestamp
Tool name, confidence, method
File names matched (not contents)
Model, tokens, session duration

Offline mode

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"

Configuration

Config file location: ~/.tempo/config.json

~/.tempo/config.json
{
  "api_token": "tmp_...",
  "api_endpoint": "https://api.usetempo.dev",
  "session_max_age_hours": 72
}

Environment variables

VariableDescription
TEMPO_API_ENDPOINTOverride the API endpoint
TEMPO_SESSION_MAX_AGESession recency window in hours (default: 72)