Documentation

Install, configure, and deploy AI Integrity Receipts in minutes.

Quick Start

Receipt your last commit in 10 seconds:

pip install aiir
cd your-repo
aiir --pretty

That's it. Zero dependencies. Python 3.9+. Apache 2.0.

Three Interfaces

One tool, three ways to use it. Same cryptographic core underneath.

๐Ÿ’ป CLI

Receipt commits from your terminal:

# Receipt the last commit
aiir --pretty

# Receipt a whole PR branch
aiir --range origin/main..HEAD --pretty

# Only AI-authored commits
aiir --ai-only --output .receipts/

# Pipe to jq
aiir --range HEAD~5..HEAD --jsonl | jq .receipt_id

# Verify a receipt
aiir --verify receipt.json

โš™๏ธ GitHub Action

One YAML file. Every push and PR gets a receipt, uploaded as a build artifact:

# .github/workflows/aiir.yml
name: AIIR
on: [push, pull_request]

jobs:
  receipt:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: invariant-systems-ai/aiir@v1

๐Ÿค– MCP Tool

Any MCP-aware AI assistant โ€” Claude, Copilot, Cursor โ€” discovers and uses AIIR automatically. Add to your MCP config:

{
  "mcpServers": {
    "aiir": {
      "command": "aiir-mcp-server",
      "args": ["--stdio"]
    }
  }
}

Now your AI generates receipts after writing code. Zero friction.

PlatformConfig file
Claude Desktopclaude_desktop_config.json
VS Code / Copilot.vscode/mcp.json
Cursor.cursor/mcp.json

What It Detects

AIIR scans commit metadata for AI-involvement signals using heuristic_v1:

SignalExamples
CopilotCo-authored-by: Copilot, Co-authored-by: GitHub Copilot
ChatGPTGenerated by ChatGPT, Co-authored-by: ChatGPT
ClaudeGenerated by Claude, Co-authored-by: Claude, Claude Code
CursorGenerated by Cursor, Co-authored-by: Cursor, Cursor Tab
CodeiumCodeium in commit messages or metadata
WindsurfWindsurf in commit messages or metadata
Sourcegraph CodySourcegraph Cody in commit messages or metadata
Amazon QAmazon Q, CodeWhisperer, amazon-q bot author
DevinCo-authored-by: Devin, devin[bot] author
Google GeminiGemini Code Assist, gemini[bot] author
TabnineTabnine in commit messages, tabnine bot author
Aideraider: prefix in commit messages
Botsdependabot, renovate, snyk-bot, coderabbit, deepsource
GenericAI-generated, LLM-generated, machine-generated
TrailersGenerated-by:, AI-assisted:, AI-model:, Tool: git trailers
Detection is heuristic, not magic. AIIR catches commits with declared AI markers. It doesn't detect silent copy-paste from ChatGPT. This is by design โ€” AIIR receipts what's declared, not what's hidden.

Receipt Format

Each receipt is a content-addressed JSON document. The receipt_id is derived from SHA-256 of the canonical JSON โ€” change any field and the hash breaks:

{
  "type": "aiir.commit_receipt",
  "schema": "aiir/commit_receipt.v1",
  "version": "1.0.0",
  "commit": {
    "sha": "c4dec85630232666aba81...",
    "author": { "name": "Jane Dev", "email": "jane@example.com", "date": "2026-03-07T09:45:00-05:00" },
    "committer": { "name": "Jane Dev", "email": "jane@example.com", "date": "2026-03-07T09:48:00-05:00" },
    "subject": "feat: add receipt generation to CI",
    "message_hash": "sha256:e3b0c44298...",
    "diff_hash": "sha256:b2c1d4e5f6...",
    "files_changed": 4,
    "files": ["src/ci.py", "tests/test_ci.py", ".github/workflows/aiir.yml", "README.md"]
  },
  "ai_attestation": {
    "is_ai_authored": true,
    "signals_detected": ["message_match:co-authored-by: copilot"],
    "signal_count": 1,
    "detection_method": "heuristic_v1"
  },
  "provenance": {
    "repository": "https://github.com/example/repo",
    "tool": "https://github.com/invariant-systems-ai/aiir@1.0.0",
    "generator": "aiir.cli"
  },
  "receipt_id": "g1-a3f8b2c1d4e5f6a7b8c9d0e1f2a3b4",
  "content_hash": "sha256:7f3a8b2c1d...",
  "timestamp": "2026-03-07T14:48:59Z"
}

Sigstore Signing

Unsigned receipts are tamper-evident โ€” anyone can detect changes, but anyone who re-runs aiir can recreate a matching receipt. For cryptographic non-repudiation, enable Sigstore keyless signing:

# Install signing support
pip install aiir[sign]

# Sign in CI
- uses: invariant-systems-ai/aiir@v1
  with:
    output-dir: .receipts/
    sign: true

Each signed receipt gets an accompanying .sigstore bundle:

  • Fulcio certificate โ€” short-lived cert proving the signer's OIDC identity
  • Rekor transparency log โ€” tamper-evident public record
  • Signature โ€” cryptographic binding to the receipt content

Verify locally:

aiir --verify receipt.json --verify-signature

GitHub Action Reference

Inputs

InputDescriptionDefault
ai-onlyOnly receipt AI-authored commitsfalse
commit-rangeSpecific commit rangeAuto-detected
output-dirDirectory to write receipt JSON filesPrints to log
signSign receipts with Sigstorefalse

Outputs

OutputDescription
receipt_countNumber of receipts generated
ai_commit_countNumber of AI-authored commits detected
receipts_jsonFull JSON array of all receipts

Example: PR Comment

- uses: invariant-systems-ai/aiir@v1
  id: receipt
  with:
    output-dir: .receipts/

- name: Comment on PR
  if: steps.receipt.outputs.ai_commit_count > 0
  uses: actions/github-script@v7
  with:
    script: |
      const count = '${{ steps.receipt.outputs.ai_commit_count }}';
      const total = '${{ steps.receipt.outputs.receipt_count }}';
      github.rest.issues.createComment({
        issue_number: context.issue.number,
        owner: context.repo.owner,
        repo: context.repo.repo,
        body: `๐Ÿ” **AIIR**: ${total} commits receipted, ${count} AI-authored.`
      });

Example: Enforce Receipt Policy

- uses: invariant-systems-ai/aiir@v1
  id: receipt

- name: Enforce receipt policy
  if: steps.receipt.outputs.ai_commit_count > 0
  run: |
    echo "โœ… ${{ steps.receipt.outputs.ai_commit_count }} AI commits receipted"

Ready to start?

One command. Zero dependencies. Apache 2.0.

View on GitHub โ†’ PyPI