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

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.

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.0.tar.gz (43.1 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.0-cp314-cp314-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.14Windows x86-64

wtg_cli-0.1.0-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.0-cp314-cp314-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

wtg_cli-0.1.0-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.0-cp313-cp313-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

wtg_cli-0.1.0-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.0-cp312-cp312-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

wtg_cli-0.1.0-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.0-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.0.tar.gz.

File metadata

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

File hashes

Hashes for wtg_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 40c830da60b8d7630618f6d0666dc284fe1ca52ea8d229a393e0971528aa6fe4
MD5 776fb3fc0810075482618ab2a19c2204
BLAKE2b-256 c7f4935cdbbcbebdd1c84597e112a1abde87edce6841be2dffb0dfd9cfc69e37

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wtg_cli-0.1.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 b653bd8ee04c66b9a79b54148a88042365701fbf6cbcffa27b50441e81c4af49
MD5 4b824de4436a373b7c540087552c8e92
BLAKE2b-256 c1ca37be9628dd310a143fe62a889edfa9a77673229629603aa63b2d84b822fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wtg_cli-0.1.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 297e9c54aeffc6140a374aed1e29c9d7e9e51658b56b9ff903b336fc66278623
MD5 36959cd5dd9f131d879816f16bcdb86a
BLAKE2b-256 599d56fe4e437ab2b1b34560522ebbbc2ac8813fe1e4045ba8eb8054c8f1bb54

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wtg_cli-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1b1ce24bac0b85bce2219f993bc01121feefe6fa87781a4e9b1d8c632848541f
MD5 0c320fc19b513c7d80cfdbda53c55778
BLAKE2b-256 72f544c2e7344a484e7a149ffb4a119f8ea0be9798eb8e9a30b30cfe2f3fd61c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wtg_cli-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 127d150494df6aaf23556b5d3fc6629025bdee22cb3894204cc23a855a90b61b
MD5 299b176229292bbde58c51f7f40d0a16
BLAKE2b-256 4a71eb324d2fdd77be18072959991435370c4e3c7de5330714bffb200b109844

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wtg_cli-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ed0adcc4538524b32193cbb10b6e213e7f24ea73219714abe45a72c9714e7138
MD5 5b5bc2b7951ff040b3b2104e6b5325f0
BLAKE2b-256 914d49f7338bbd79fa7f6ae11f0e48906d415594f6f12bac77b7fb193955fef6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wtg_cli-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0c32ba9cd8e40aa390698fe368971328f630837e38ca1e3f154209927b3b368a
MD5 49660d8fa280ea303ef55381edaee2b5
BLAKE2b-256 d0e8084c68fa651dfc1d294ccdad75f60e06122456844b460502eb79fa0909a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wtg_cli-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1cecff0ecbfafb40fe3984accd61e1794baa4b1f8dd31d2e8410fd66f3e387c1
MD5 735363ee167f6b077ddf0f6ee0b864c4
BLAKE2b-256 24b89bccee72bb10c75daed6e7ffcb4f3c90b0948201b3caf462ac90690933ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wtg_cli-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 01b979d8394f6103618248ff3c9763690f18778dd4724d885b7797a380b320c4
MD5 0d46482299e35151f20d43da29af3804
BLAKE2b-256 7a06559ceaf74a27cde24f9c70d1d3f0a988c184df8fefaf5a85d9edcfa1760d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wtg_cli-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 91d4e055fef137209897964fd798261d9991ba0e858224de3989a930dae0c50f
MD5 1655a882d4ff74c16892821aa48f4279
BLAKE2b-256 60191e1003d5f103e4097c4618f0f96fd68b8fded6c8764e3131a2380ba84edf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wtg_cli-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3894f41470a5d183cdf71f7f13f0afadc3524a2f409d623d95cdce2919c8b114
MD5 29f85d96a32f64a0c501984f839bc08b
BLAKE2b-256 e3bab48e3d565836902de304bca2cb8c96c2df9e64320ef021e0a431ef732231

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wtg_cli-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c7871214a0c8b31fc96d6a254314f2e14ca1ca04f15faa8b382781f5925cfaa3
MD5 d7830c8db7010f6efc360d961571f285
BLAKE2b-256 f6f7728f99127452cd29326d5b0f97f8ec159b9b274e0753dd90a0762acde77c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wtg_cli-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f9666414be2d7bbc312bd457837a6b4bbe4c6129d1bac4268ee5ad265c848326
MD5 55d61a3d9551a718c5cc67e5d5e1117c
BLAKE2b-256 1cb7da523215424a9085f9108ed59dee932151b594e77f8e4eece238905a524e

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