Skip to main content

What The Git CLI – snarky Git history sleuth packaged for Python

Project description

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

PyPI Crates.io CI

Demo

Demo

Try it yourself!

uvx --from wtg-cli wtg https://github.com/go-task/task/issues/1322

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:

uvx --from wtg-cli wtg --help

Or install it as a global tool (works on macOS, Linux, and Windows):

uv tool install wtg-cli
wtg --help

Alternative: build/install from source

cargo install wtg-cli

Usage

Local Repository

Simply run wtg with any of the following:

# Find a commit by hash
wtg c62bbcc

# Find an issue or PR
wtg 123
wtg #123

# Find a file
wtg Cargo.toml

# Find a tag
wtg v1.2.3

Remote Repository

Query any GitHub repository without cloning it first:

# Using -r flag with owner/repo
wtg -r astral-sh/uv 0.5.0

# Using full GitHub URL
wtg -r https://github.com/astral-sh/uv v0.5.0

# Paste any GitHub URL directly
wtg https://github.com/astral-sh/uv/commit/abc123
wtg https://github.com/astral-sh/uv/issues/42
wtg https://github.com/astral-sh/uv/pull/123
wtg https://github.com/astral-sh/uv/blob/main/README.md

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:

  1. Environment variable (recommended):

    export GITHUB_TOKEN=ghp_your_token_here
    
  2. GitHub CLI: wtg automatically reads from ~/.config/gh/hosts.yml if you have gh installed

  3. Anonymous: Works without auth but has lower rate limits (60 requests/hour)

How It Works

  1. Opens your git repository
  2. Tries to identify the input type (commit, issue, file, tag)
  3. Fetches additional info from GitHub API if available
  4. Finds the closest release that contains the commit
  5. 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wtg_cli-0.1.1.tar.gz (59.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

wtg_cli-0.1.1-cp314-cp314-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.14Windows x86-64

wtg_cli-0.1.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

wtg_cli-0.1.1-cp314-cp314-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

wtg_cli-0.1.1-cp313-cp313-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.13Windows x86-64

wtg_cli-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

wtg_cli-0.1.1-cp313-cp313-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

wtg_cli-0.1.1-cp312-cp312-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.12Windows x86-64

wtg_cli-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

wtg_cli-0.1.1-cp312-cp312-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

wtg_cli-0.1.1-cp311-cp311-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.11Windows x86-64

wtg_cli-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

wtg_cli-0.1.1-cp311-cp311-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file wtg_cli-0.1.1.tar.gz.

File metadata

  • Download URL: wtg_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 59.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.8

File hashes

Hashes for wtg_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5345908e2e93df104bfb8e25a2f8ce7df536ac551a8cdd934bd8f376151a8f08
MD5 f5dc83110ef81040cfb183d54bd7da70
BLAKE2b-256 39d86834675286ddf8f069f2590a7728f0b296247a12a467f6f1e4f9a57dd458

See more details on using hashes here.

File details

Details for the file wtg_cli-0.1.1-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for wtg_cli-0.1.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 61584f5fbf0fa91f50dbaa5ccf7788bb069f48d1d48d7dcf59058a87a74fe3dc
MD5 ed4bd480f6e8950283c879e7db714c23
BLAKE2b-256 84d0aa66bd5d665f24c16066876c0da3cdd2ae270ab36f24be83d79ab9698e9d

See more details on using hashes here.

File details

Details for the file wtg_cli-0.1.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for wtg_cli-0.1.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2626a38ebde5be9816508f20c99b6cc196213144347c641ee4c4db666dd5ac4c
MD5 ce355eef8ef8de4385cc8d476edcd0ab
BLAKE2b-256 2e5eec54f4e10e7c1f3530ae9c922d68b03ce3408b3c3ad55f170e55bf322809

See more details on using hashes here.

File details

Details for the file wtg_cli-0.1.1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wtg_cli-0.1.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 39e9407a7a72ae32d15ffacf74715fcb50fb6f068ac3688610c1e2f3945fe56c
MD5 978de44a4889bdb36cfb2933d12cfce8
BLAKE2b-256 a4b1b3c0ac9d5acd1cb05e59899e962c1dbc54a4498f21f4b015119ce2f6399a

See more details on using hashes here.

File details

Details for the file wtg_cli-0.1.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for wtg_cli-0.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 10a31e7aecba448a16bf5c2f38e67ffbd8412d15df7f367042dfdda6471c7f72
MD5 ea236f9826bdc7f5dd2ae1b00722428b
BLAKE2b-256 e02ed1ad3a636ffe5a7cd0e11c7e7b345c8f0f60d0f2d8fb43a925d005d54367

See more details on using hashes here.

File details

Details for the file wtg_cli-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for wtg_cli-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e182ab34c25c6c623d4801e96ddaabc34a7e9395f23781a0a0a3ba11e8f5d829
MD5 ed34dc0171807ede84bce91ec2fd4fc2
BLAKE2b-256 0aa4facc11a772628e0e6be5d6eba45578cfe094cd814cd92250c7294208fdfa

See more details on using hashes here.

File details

Details for the file wtg_cli-0.1.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wtg_cli-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 22c0484140c7049a347205559b87063b3965619fd562427e52736ba31977b595
MD5 2d75228665868d61ba1ec03cc78068c6
BLAKE2b-256 20fb040cb789d298b7955b3c407d9dfb9b8ff2489c8b1c81e40f5169ba948ec5

See more details on using hashes here.

File details

Details for the file wtg_cli-0.1.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for wtg_cli-0.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5b18c6330e07b223766dc2b6727c109629c99da2c4ab69e75a779d0274dc595e
MD5 8fc755510d38e5a0ddf975c73ceab7c5
BLAKE2b-256 e021e27352d55e6cd696b58e23b863704b2e7c49db25eb9f1a1ba93be5199ba7

See more details on using hashes here.

File details

Details for the file wtg_cli-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for wtg_cli-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e4c02d05126b0e7850ea80b4eecd57f20bae941e475b8d8b5ab370fb81c075a7
MD5 4a639335504181d320cedbec4467a42a
BLAKE2b-256 d59db86f13b7263c8d617a4ed9fe3113a0f0153299c4d5fa3ada7bc032aceb98

See more details on using hashes here.

File details

Details for the file wtg_cli-0.1.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wtg_cli-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5b672f3658a7eeba594b611b1d9eaf8e5093c92094ba92b16ef6ee35b6f54bae
MD5 2ab95f62cab697d6662cbcd83a348bde
BLAKE2b-256 1f0ee4f85ecc11713b465e3c83bcd749428bbd92e988753586fd2d00055dadd4

See more details on using hashes here.

File details

Details for the file wtg_cli-0.1.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for wtg_cli-0.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c9d83cec456134a91da64929dbe35d010ce56948b1c45dffd10dfd1f2a6902c4
MD5 8bff00b98ed00fc5ed59302206f06336
BLAKE2b-256 1cacf445a241eb6b619c1d3a05bfbd54f08bed587f0998a913a9e95f3a002ac8

See more details on using hashes here.

File details

Details for the file wtg_cli-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for wtg_cli-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0972630eafe51b77dcf9e1f18051362ba8c8365126fdfa55ae652cdd7aae3aaf
MD5 51879fcb51ddbd242f5c55b46714fc1d
BLAKE2b-256 4e2b823375add681f57780aeeb0199fc05572bab45d5464789c9262559134428

See more details on using hashes here.

File details

Details for the file wtg_cli-0.1.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wtg_cli-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 713a4e739fe1af4629d1e9b2b369b2faae9223db70fb37c8e740b4e4ade0fdc7
MD5 32011f805ff3950b64866a7b7639e8ea
BLAKE2b-256 a2a682a69a4a3fc22b16156810b0566450d24b3d26426cae5ddfe993fc90c326

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page