Tig automatically captures Cursor AI chats, code diffs, and commit context using post-commit git hooks with cloud storage via Supabase edge functions.
- Automatic Capture: Saves context on every commit via post-commit hook
- Cloud Storage: Stores data in Supabase cloud storage via edge functions
- Cursor Integration: Extracts AI chats directly from Cursor's SQLite database
- No Manual Logging: Completely automatic - no need to remember to log interactions
- Comprehensive Context: Includes commit info, changed files, diffs, and AI conversations
- Simple & Clean: No local files or UUIDs - everything stored in the cloud
- GitHub OAuth: Secure authentication with GitHub using OAuth device flow
- PR View: Automatic comment on PRs with link to view all interactions from that PR
- Tig Blame: Map any line of code back to the AI interaction that created it
Install globally via npm:
npm install -g @tigtech/tigAfter installing via npm:
-
Login to Tig with GitHub:
tig login
-
Run setup:
tig setup
During setup, you'll interactively select which AI platforms to extract from:
- Cursor (enabled by default)
- Claude Code (disabled by default)
Use arrow keys and space to toggle, Enter to confirm.
-
Start committing - Tig will automatically capture context on every commit!
Notes:
- GitHub authentication is required for private repositories.
- Tig setup automatically checks if the Tig Connector GitHub App is installed on your repository. If missing, it will:
- Open the installation page in your browser
- Wait for you to complete the installation
- Verify and continue setup automatically
- The GitHub App is required for automatic branch updates after PR merges.
- For headless environments, use
tig setup --no-interactiveto skip prompts and use defaults.
After you commit, the git hook automatically (in the background):
- Extracts all chats related to your project
- Captures current commit information (hash, message, author, changed files)
- Uploads the payload to Supabase cloud storage
Just commit normally - context is saved automatically:
# Make your changes
git add .
git commit -m "Add authentication system"
git push origin main# Check setup status
tig status # Verify Tig status
# Resolve code to AI interactions
tig blame path/to/file.py:42 # Find the exact prompt which generated a line of code
# Bulk upload all existing chats
tig upload-all-chats # Upload all chats with a synthetic upload-all-chats commit
# GitHub OAuth authentication
tig login # Login to GitHub using OAuth device flow
tig whoami # Show current GitHub username
tig logout # Logout from GitHub
# Uninstall from a repository
tig uninstall # Remove git hooks from current repositoryTig blame maps any line of code back to the AI interaction that created it:
# Find which AI interaction introduced a specific line
tig blame src/app.py:127
# Real example output:
# File: src/app.py:127
# Commit: abc123def456
# Found 1 matching interaction(s):
#
# 1. Interaction: uuid-1234
# Preview: Add user authentication with JWT tokens...
# Link: https://app.usetig.dev/conversations/conv-id?interaction=uuid-1234See documentation/database/blame/ for performance optimization options.
When you create a pull request, Tig automatically posts a comment with a link to view all AI interactions from commits in that PR:
How it works:
- Create a PR as usual on GitHub
- Tig GitHub App automatically detects the PR
- If interactions exist for commits in the PR, a comment is posted with a link
- Click the link to view all interactions chronologically in the Tig web app
Example:
PR created: feature/auth → main
↓
Tig posts comment: https://app.usetig.dev/repos/owner/repo/pulls/123
↓
Click link to see all AI interactions from this PR
Requirements:
- Tig GitHub App must be installed on your repository
tig setuphandles this automatically during installation
The PR view shows:
- All AI interactions from commits in the PR
- Chronological timeline of prompts and responses
- Links to related conversations and commits
- Clean, unified view of the development process
After setting up Tig in an existing project, you can backfill all your historical Cursor chats using:
tig upload-all-chatsThis command:
- Extracts all Cursor chat interactions for your project
- Creates a synthetic commit with ID like
'upload-all-chats-<mock_commit_hash>' - Sets the commit timestamp to include all discovered chats
- Uploads everything to Supabase in one bulk operation
Note: This is useful when you've been using Cursor for a while and want to capture all past AI interactions. The synthetic commit allows you to view all historical chats in your Tig dashboard.
To remove Tig from a specific repository:
tig uninstallThis command will:
- Remove the post-commit hook from
.git/hooks/ - Only remove hooks that were created by Tig (verifies before removing)
- Preserve all previously uploaded data in cloud storage
- Keep your GitHub authentication (use
tig logoutto remove separately)
To completely remove Tig from your system:
-
Remove from each repository (where you've run
tig setup):cd /path/to/your/project tig uninstall -
Logout from GitHub:
tig logout -
Uninstall the npm package:
npm uninstall -g tig-cursor
Note: Uninstalling does not delete your data from cloud storage. All previously captured interactions remain accessible in your Supabase dashboard.
Tig supports secure authentication with GitHub using OAuth device flow:
tig loginThis will:
- Start the GitHub OAuth device flow
- Display a verification URL and code (e.g.,
https://github.com/login/deviceand codeXXXX-XXXX) - Wait for you to authorize the app in your browser
- Store the access token locally in
~/.tig/config.json
tig whoamiShows your GitHub username if logged in, or "Not logged in" if not authenticated.
tig logoutClears the stored GitHub token and logs you out.
- Tokens are stored securely in
~/.tig/config.json - The file contains a JSON object with a
github_tokenproperty - Tokens are automatically validated when used
- Tokens require
user:emailandreposcopes for full functionality - The
reposcope is needed to access private repositories and organization repositories
Error: "Repository not found or not accessible"
- Make sure you're logged in:
tig login - Ensure your token has the
reposcope (required for private repos and org repos) - If you previously logged in with insufficient scopes, run:
tig logoutthentig login
Error: "GitHub token expired or invalid"
- Run
tig logoutthentig loginto re-authenticate
Error: "Access denied to repository"
- Check if you have access to the private repository
- Ensure your GitHub token has the
reposcope - For organization repositories, make sure you're a member with appropriate permissions