What The Git (wtg) 🔍
A snarky but helpful CLI tool to identify git commits, issues, PRs and file changes, and tell you which release they shipped in. Because sometimes you just need to know what the git is going on!
A totally vibe-coded tool, so do not blame me if it hurts your feelings. 😄
Demo
Try it yourself!
Features
- 🔍 Smart Detection: Automatically identifies what you're looking for (commit hash, issue/PR number, file path, or tag)
- 🌐 Remote Repository Support: Work with any GitHub repository without cloning it locally
- 🔗 GitHub URL Parsing: Paste any GitHub URL (commit, issue, PR, file) and wtg figures it out
- 🎨 Colorful Output: Beautiful terminal output with emojis and colors
- 😄 Snarky Messages: Helpful error messages with personality
- 📦 Release Tracking: Finds which release first shipped your commit
- 👤 Blame Info: Shows who's responsible for that pesky bug
- 🚀 Smart Caching: Efficiently caches remote repositories with minimal disk usage
- 🌐 Graceful Degradation: Works without network or GitHub remote
Installation
Recommended: Python package
Run the (python) CLI without installing anything permanently:
Or install it as a global tool (works on macOS, Linux, and Windows):
Alternative: build/install from source
Usage
Local Repository
Simply run wtg with any of the following:
# Find a commit by hash
# Find an issue or PR
# Find a file
# Find a tag
Remote Repository
Query any GitHub repository without cloning it first:
# Using -r flag with owner/repo
# Using full GitHub URL
# Paste any GitHub URL directly
Note: Remote repositories are cached in your system's cache directory for faster subsequent queries. The cache uses --filter=blob:none (Git 2.17+) for minimal disk usage, with automatic fallback to bare clones on older Git versions. On macOS this lives under ~/Library/Caches/wtg/repos, on Linux it defaults to ~/.cache/wtg/repos, and on Windows it follows %LOCALAPPDATA%\wtg\repos.
Output Examples
Commit
🔍 Found commit: c4e0cc8e98d3
💻 The Commit:
Hash: c4e0cc8
👤 Who wrote this gem:
mishamsk (5206955+mishamsk@users.noreply.github.com)
🔗 https://github.com/mishamsk
📝 ⬇️ reduce msrv
📅 2024-11-07 03:37:26
🔗 https://github.com/mishamsk/sas-lexer/commit/c4e0cc8e98d3e786916ac811c5617ecb68d1a6fd
📦 First shipped in:
🎉 rust-v1.0.0-beta.3 (rust-v1.0.0-beta.3)
📅 2024-11-08 03:03:21 U
🔗 https://github.com/mishamsk/sas-lexer/releases/tag/rust-v1.0.0-beta.3
GitHub Authentication
For better rate limits, set a GitHub token:
-
Environment variable (recommended):
-
GitHub CLI: wtg automatically reads from
~/.config/gh/hosts.ymlif you haveghinstalled -
Anonymous: Works without auth but has lower rate limits (60 requests/hour)
How It Works
- Opens your git repository
- Tries to identify the input type (commit, issue, file, tag)
- Fetches additional info from GitHub API if available
- Finds the closest release that contains the commit
- Displays everything in a beautiful, colorful format
Limitations
- Only supports GitHub (GitLab and others coming... maybe?)
- Squashed commits detection not yet implemented
- No TUI mode (planned for future)
License
MIT
Contributing
Found a bug? Want to add a snarky message? PRs welcome! Just make sure to keep the snark levels high and the code quality higher.